Summary
As we approach the end of this chapter, we should now be familiar with all the possibilities models give us to structure data models.
We have seen that models are usually based on the models.Model class, but we can also use models.Abstract for reusable mixin models and models.Transient for wizards or advanced user interaction dialogs. We have seen the general model attributes available, such as _order for default sort order, and _rec_name for the default field to use for record representation.
The fields in a model define all the data they will store. We have also seen the non-relational field types available, and the attributes they support. We also learned about the several types of relational fields, many-to-one, one-to-many, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access