diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/applications.txt | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt index eadf9895ca..38bf474371 100644 --- a/docs/ref/applications.txt +++ b/docs/ref/applications.txt @@ -114,24 +114,33 @@ Application configuration Configurable attributes ----------------------- -.. attribute:: AppConfig.verbose_name +.. attribute:: AppConfig.name - Human-readable name for the application, e.g. "Admin". + Full Python path to the application, e.g. ``'django.contrib.admin'``. - If this isn't provided, Django uses ``label.title()``. + This attribute defines which application the configuration applies to. It + must be set in all :class:`~django.apps.AppConfig` subclasses. -Read-only attributes --------------------- + It must be unique across a Django project. -.. attribute:: AppConfig.name +.. attribute:: AppConfig.label - Full Python path to the application, e.g. ``'django.contrib.admin'``. + Short name for the application, e.g. ``'admin'`` -.. attribute:: AppConfig.label + This attribute allows relabelling 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. + +.. attribute:: AppConfig.verbose_name - Last component of the Python path to the application, e.g. ``'admin'``. + Human-readable name for the application, e.g. "Admin". + + This attribute defaults to ``label.title()``. - This value must be unique across a Django project. +Read-only attributes +-------------------- .. attribute:: AppConfig.path |
