summaryrefslogtreecommitdiff
path: root/docs/intro
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-01-18 19:34:54 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-01-18 23:06:00 +0100
commit10e0cfc0e4e77b85e8261c908baf1c4814ded3f8 (patch)
tree26c894168f5875b9f7a2ace228a1b937698cc36d /docs/intro
parent74d8fdcfa6a49cb30210c690dff08fc62b642e2a (diff)
Fixed #21712 -- Moved autodiscover() to AdminConfig.ready().
Thanks Marc Tamlyn for the initial version of the patch.
Diffstat (limited to 'docs/intro')
-rw-r--r--docs/intro/tutorial01.txt9
-rw-r--r--docs/intro/tutorial03.txt11
2 files changed, 15 insertions, 5 deletions
diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt
index 3fa07e132c..e79535661c 100644
--- a/docs/intro/tutorial01.txt
+++ b/docs/intro/tutorial01.txt
@@ -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
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
index 2e0159f1db..d443536c1a 100644
--- a/docs/intro/tutorial03.txt
+++ b/docs/intro/tutorial03.txt
@@ -105,15 +105,20 @@ with:
:filename: mysite/urls.py
from django.conf.urls import patterns, include, url
-
from django.contrib import admin
- admin.autodiscover()
urlpatterns = patterns('',
url(r'^polls/', include('polls.urls')),
url(r'^admin/', include(admin.site.urls)),
)
+.. admonition:: Doesn't match what you see?
+
+ If you're seeing ``admin.autodiscover()`` before the definition of
+ ``urlpatterns``, 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.
+
You have now wired an ``index`` view into the URLconf. Go to
http://localhost:8000/polls/ in your browser, and you should see the text
"*Hello, world. You're at the polls index.*", which you defined in the
@@ -587,9 +592,7 @@ it to include namespacing:
:filename: mysite/urls.py
from django.conf.urls import patterns, include, url
-
from django.contrib import admin
- admin.autodiscover()
urlpatterns = patterns('',
url(r'^polls/', include('polls.urls', namespace="polls")),