-
Book Overview & Buying
-
Table Of Contents
Mastering Django: Core
By :
Every Field instance contains several attributes that allow introspecting its behavior. Use these attributes instead of isinstance checks when you need to write code that depends on a field's functionality. These attributes can be used together with the Model._meta API to narrow down a search for specific field types. Custom model fields should implement these flags.
Boolean flag that indicates if the field was automatically created, such as the OneToOneField used by model inheritance.
Boolean flag that indicates if the field has a database column associated with it.
Boolean flag that indicates if a field is used to back another non-hidden field's functionality (for example, the content_type and object_id fields that make up a GenericForeignKey). The hidden flag is used to distinguish what constitutes the public subset of fields on the model from all the fields on the model.
Change the font size
Change margin width
Change background colour