diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-31 16:23:42 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-31 17:30:58 +0100 |
| commit | c40209dcc09f19524fb85251f39a4051491bbec0 (patch) | |
| tree | f7788f18e608acf0befab73b3391fea4c21a7066 /docs/ref | |
| parent | 5dfec4e23b4a3b81f8ec19bf0cf45147ad6b18e5 (diff) | |
Made it possible to change an application's label in its configuration.
Fixed #21683.
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 |
