summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/applications.txt29
-rw-r--r--docs/releases/1.7.txt3
2 files changed, 22 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
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index c17f62aeee..453714b6f1 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -79,6 +79,9 @@ Improvements thus far include:
* It is possible to omit ``models.py`` entirely if an application doesn't
have any models.
+* Applications can be relabeled with the :attr:`~django.apps.AppConfig.label`
+ attribute of application configurations, to work around label conflicts.
+
* The name of applications can be customized in the admin with the
:attr:`~django.apps.AppConfig.verbose_name` of application configurations.