diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-31 17:25:57 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-31 18:04:54 +0100 |
| commit | 63137a8304d4387132e749c97aad1049526f601c (patch) | |
| tree | 5d7be83894c596f8fa7cd082f2f8229950f3d342 /docs | |
| parent | c40209dcc09f19524fb85251f39a4051491bbec0 (diff) | |
Enforced unicity of app labels.
Fixed #21679.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.7.txt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 453714b6f1..af0acd7152 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -655,6 +655,22 @@ script with:: Otherwise, you will hit ``RuntimeError: App registry isn't ready yet.`` +App registry consistency +^^^^^^^^^^^^^^^^^^^^^^^^ + +It is no longer possible to have multiple installed applications with the same +label. In previous versions of Django, this didn't always work correctly, but +didn't crash outright either. + +If you have two apps with the same label, you should create an +:class:`~django.apps.AppConfig` for one of them and override its +:class:`~django.apps.AppConfig.label` there. You should then adjust your code +wherever it references this application or its models with the old label. + +You should make sure that your project doesn't import models from applications +that aren't in :setting:`INSTALLED_APPS`. Relations involving such models may +not be created properly. Future versions of Django may forbid this entirely. + Subclassing AppCommand ^^^^^^^^^^^^^^^^^^^^^^ @@ -663,13 +679,6 @@ Subclasses of :class:`~django.core.management.AppCommand` must now implement a ``handle_app()``. This method receives an :class:`~django.apps.AppConfig` instance instead of a models module. -App registry consistency -^^^^^^^^^^^^^^^^^^^^^^^^ - -You should make sure that your project doesn't import models from applications -that aren't in :setting:`INSTALLED_APPS`. Relations involving such models may -not be created properly. - Introspecting applications ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
