apps.AppConfig.verbose_name

AppConfig.verbose_name Human-readable name for the application, e.g. “Administration”. This attribute defaults to label.title().

apps.AppConfig.ready()

AppConfig.ready() [source] Subclasses can override this method to perform initialization tasks such as registering signals. It is called as soon as the registry is fully populated. Although you can’t import models at the module-level where AppConfig classes are defined, you can import them in ready(), using either an import statement or get_model(). If you’re registering model signals, you can refer to the sender by its string label instead of using the model class itself. Example: from djan

apps.AppConfig.path

AppConfig.path Filesystem path to the application directory, e.g. '/usr/lib/python3.4/dist-packages/django/contrib/admin'. In most cases, Django can automatically detect and set this, but you can also provide an explicit override as a class attribute on your AppConfig subclass. In a few situations this is required; for instance if the app package is a namespace package with multiple paths.

apps.AppConfig.name

AppConfig.name Full Python path to the application, e.g. 'django.contrib.admin'. This attribute defines which application the configuration applies to. It must be set in all AppConfig subclasses. It must be unique across a Django project.

apps.AppConfig.module

AppConfig.module Root module for the application, e.g. <module 'django.contrib.admin' from 'django/contrib/admin/__init__.pyc'>.

apps.AppConfig.models_module

AppConfig.models_module Module containing the models, e.g. <module 'django.contrib.admin.models' from 'django/contrib/admin/models.pyc'>. It may be None if the application doesn’t contain a models module. Note that the database related signals such as pre_migrate and post_migrate are only emitted for applications that have a models module.

apps.AppConfig.label

AppConfig.label Short name for the application, e.g. 'admin' This attribute allows relabeling an application when two applications have conflicting labels. It defaults to the last component of name. It should be a valid Python identifier. It must be unique across a Django project.

apps.AppConfig.get_models()

AppConfig.get_models() [source] Returns an iterable of Model classes for this application.

apps.AppConfig.get_model()

AppConfig.get_model(model_name) [source] Returns the Model with the given model_name. Raises LookupError if no such model exists in this application. model_name is case-insensitive.

apps.AppConfig

class AppConfig [source] Application configuration objects store metadata for an application. Some attributes can be configured in AppConfig subclasses. Others are set by Django and read-only.