db.models.Options.app_label

Options.app_label

If a model is defined outside of an application in INSTALLED_APPS, it must declare which app it belongs to:

app_label = 'myapp'
New in Django 1.9.

If you want to represent a model with the format app_label.object_name or app_label.model_name you can use model._meta.label or model._meta.label_lower respectively.

doc_Django
2016-10-09 18:35:57
Comments
Leave a Comment

Please login to continue.