Browse Source

Document properly specifying forked app in "INSTALLED_APPS"

master
Joseph Wayodi 3 years ago
parent
commit
f8e1439bf1
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      docs/source/topics/customisation.rst

+ 14
- 0
docs/source/topics/customisation.rst View File

@@ -95,6 +95,20 @@ with that for your own app.
95 95
             'yourappsfolder.dashboard.reports.apps.ReportsDashboardConfig',
96 96
         ]
97 97
 
98
+.. note::
99
+
100
+    It is recommended to use the dotted Python path to the app config class,
101
+    rather than to the app package (e.g. ``yourappsfolder.order.apps.OrderConfig``
102
+    instead of ``yourappsfolder.order``).
103
+
104
+    This is to work around a `problem`_ in the way Django's automatic
105
+    ``AppConfig`` discovery (introduced in version 3.2) scans for ``AppConfig``
106
+    subclasses in an app's ``apps.py`` module (in short, it finds all
107
+    ``AppConfig`` subclasses in the ``apps.py``, including ones imported to be
108
+    subclassed). Specifying the path to the app config class ensures that
109
+    automatic ``AppConfig`` discovery is not used at all.
110
+
111
+.. _`problem`: https://code.djangoproject.com/ticket/33013
98 112
 
99 113
 Start customising!
100 114
 ==================

Loading…
Cancel
Save