From c40209dcc09f19524fb85251f39a4051491bbec0 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Tue, 31 Dec 2013 16:23:42 +0100 Subject: Made it possible to change an application's label in its configuration. Fixed #21683. --- docs/ref/applications.txt | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'docs/ref') 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 -- cgit v1.3