diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-02-02 15:31:34 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-02-02 15:31:34 +0100 |
| commit | ab2f21080d8b3112c1ba9a0bf923eae733be4242 (patch) | |
| tree | e44aba4246d194198dc48ca53cde136519871bdb /docs/ref | |
| parent | b5fbdf97db15be7efc1059c82099a42018f8d7ac (diff) | |
Added a note about a possible name clash.
Thanks Russell for the advice.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/applications.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt index 60db009585..8ecf47546b 100644 --- a/docs/ref/applications.txt +++ b/docs/ref/applications.txt @@ -99,6 +99,15 @@ to determine which application this configuration applies to. You can define any attributes documented in the :class:`~django.apps.AppConfig` API reference. +.. note:: + + If your code imports the application registry in an application's + ``__init__.py``, the name ``apps`` will clash with the ``apps`` submodule. + The best practice is to move that code to a submodule and import it. A + workaround is to import the registry under a different name:: + + from django.apps import apps as django_apps + For application users --------------------- |
