From 80d74097b4bd7186ad99b6d41d0ed90347a39b21 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 30 Dec 2013 15:42:15 +0100 Subject: 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. --- docs/ref/django-admin.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 97923011f0..06f589ee63 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -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 -- cgit v1.3