db.models.options.Options.get_fields()

Options.get_fields(include_parents=True, include_hidden=False) [source] Returns a tuple of fields associated with a model. get_fields() accepts two parameters that can be used to control which fields are returned: include_parents True by default. Recursively includes fields defined on parent classes. If set to False, get_fields() will only search for fields declared directly on the current model. Fields from models that directly inherit from abstract models or proxy classes are considered

db.models.Options.label

Options.label New in Django 1.9. Representation of the object, returns app_label.object_name, e.g. 'polls.Question'.

db.models.options.Options

class Options [source] The model _meta API is at the core of the Django ORM. It enables other parts of the system such as lookups, queries, forms, and the admin to understand the capabilities of each model. The API is accessible through the _meta attribute of each model class, which is an instance of an django.db.models.options.Options object. Methods that it provides can be used to: Retrieve all field instances of a model Retrieve a single field instance of a model by name

db.models.Options.index_together

Options.index_together Sets of field names that, taken together, are indexed: index_together = [ ["pub_date", "deadline"], ] This list of fields will be indexed together (i.e. the appropriate CREATE INDEX statement will be issued.) For convenience, index_together can be a single list when dealing with a single set of fields: index_together = ["pub_date", "deadline"]

db.models.Options.db_tablespace

Options.db_tablespace The name of the database tablespace to use for this model. The default is the project’s DEFAULT_TABLESPACE setting, if set. If the backend doesn’t support tablespaces, this option is ignored.

db.models.Options.default_related_name

Options.default_related_name The name that will be used by default for the relation from a related object back to this one. The default is <model_name>_set. This option also sets related_query_name. As the reverse name for a field should be unique, be careful if you intend to subclass your model. To work around name collisions, part of the name should contain '%(app_label)s' and '%(model_name)s', which are replaced respectively by the name of the application the model is in, and the na

db.models.Options.get_latest_by

Options.get_latest_by The name of an orderable field in the model, typically a DateField, DateTimeField, or IntegerField. This specifies the default field to use in your model Manager’s latest() and earliest() methods. Example: get_latest_by = "order_date" See the latest() docs for more.

db.models.Options.default_manager_name

Options.default_manager_name New in Django 1.10. The name of the manager to use for the model’s _default_manager.

db.models.Options.default_permissions

Options.default_permissions Defaults to ('add', 'change', 'delete'). You may customize this list, for example, by setting this to an empty list if your app doesn’t require any of the default permissions. It must be specified on the model before the model is created by migrate in order to prevent any omitted permissions from being created.

db.models.Options.abstract

Options.abstract If abstract = True, this model will be an abstract base class.