db.models.Options.managed

Options.managed Defaults to True, meaning Django will create the appropriate database tables in migrate or as part of migrations and remove them as part of a flush management command. That is, Django manages the database tables’ lifecycles. If False, no database table creation or deletion operations will be performed for this model. This is useful if the model represents an existing table or a database view that has been created by some other means. This is the only difference when managed=F

db.models.Options.label_lower

Options.label_lower New in Django 1.9. Representation of the model, returns app_label.model_name, e.g. 'polls.question'.

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.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.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_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.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.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.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.db_table

Options.db_table The name of the database table to use for the model: db_table = 'music_album'