diff options
| author | Tim Graham <timograham@gmail.com> | 2013-07-16 13:21:17 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-07-16 19:32:30 -0400 |
| commit | 2333c9662b5ffbaec5a10fa2973b4e6e7b0555bd (patch) | |
| tree | 672bc21c469c70182021b0872eb40d76377b07cb /docs | |
| parent | fba6c2ede7b25ed8c71a18dede00865dbc5b85af (diff) | |
Fixed #14007 -- Added model discovery in models module without the need to specify app_label.
Thanks mark@ and Aramgutang for work on the patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/options.txt | 11 | ||||
| -rw-r--r-- | docs/releases/1.7.txt | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 90099d13a3..d54af37e86 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -24,12 +24,17 @@ Available ``Meta`` options .. attribute:: Options.app_label - If a model exists outside of the standard :file:`models.py` (for instance, - if the app's models are in submodules of ``myapp.models``), the model must - define which app it is part of:: + If a model exists outside of the standard locations (:file:`models.py` or + a ``models`` package in an app), the model must define which app it is part + of:: app_label = 'myapp' + .. versionadded:: 1.7 + + ``app_label`` is no longer required for models that are defined + in a ``models`` package within an app. + ``db_table`` ------------ diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 296150334b..ae2a80d7a3 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -57,6 +57,9 @@ Minor features * The :meth:`QuerySet.update_or_create() <django.db.models.query.QuerySet.update_or_create>` method was added. +* :attr:`~django.db.models.Options.app_label` is no longer required for models + that are defined in a ``models`` package within an app. + Backwards incompatible changes in 1.7 ===================================== |
