Django Models
- Models define the structure of stored data, including the field types and possibly also their maximum size, default values, selection list options, help text for documentation, label text for forms, etc.
- Models are usually defined in an application’s models.py file. They are implemented as subclasses of django.db.models.Model, and can include fields, methods and metadata.
- Methods
- Minimally, in every model you should define the standard Python class method str() to return a human-readable string for each object.
References