1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #21712 -- Moved autodiscover() to AdminConfig.ready().

Thanks Marc Tamlyn for the initial version of the patch.
This commit is contained in:
Aymeric Augustin
2014-01-18 19:34:54 +01:00
parent 74d8fdcfa6
commit 10e0cfc0e4
10 changed files with 73 additions and 26 deletions

View File

@@ -435,7 +435,7 @@ look like this:
:filename: mysite/settings.py
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.admin.apps.AdminConfig',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -444,6 +444,13 @@ look like this:
'polls',
)
.. admonition:: Doesn't match what you see?
If you're seeing ``'django.contrib.admin'`` instead of
``'django.contrib.admin.apps.AdminConfig'``, you're probably using a
version of Django that doesn't match this tutorial version. You'll want
to either switch to the older tutorial or the newer Django version.
Now Django knows to include the ``polls`` app. Let's run another command:
.. code-block:: bash