mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Stopped populating the app registry as a side effect.
Since it triggers imports, it shouldn't be done lightly. This commit adds a public API for doing it explicitly, django.setup(), and does it automatically when using manage.py and wsgi.py.
This commit is contained in:
parent
7ed20e0153
commit
80d74097b4
13 changed files with 65 additions and 52 deletions
|
@ -14,6 +14,12 @@ two things for you before delegating to ``django-admin.py``:
|
|||
* It sets the :envvar:`DJANGO_SETTINGS_MODULE` environment variable so that
|
||||
it points to your project's ``settings.py`` file.
|
||||
|
||||
* It calls ``django.setup()`` to initialize various internals of Django.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
``django.setup()`` didn't exist in previous versions of Django.
|
||||
|
||||
The ``django-admin.py`` script should be on your system path if you installed
|
||||
Django via its ``setup.py`` utility. If it's not on your path, you can find it
|
||||
in ``site-packages/django/bin`` within your Python installation. Consider
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue