The Extending the
business logic defined in a Model recipe showed how to extend methods defined on a model class. If you think about it, methods defined on the parent class of the model are also part of the model. This means that all the base methods defined on
models.Model (actually on
models.BaseModel, which is the parent class of
models.Model) are also available and can be extended.
This recipe shows how to extend
write() to control access to some fields of the records.