Opened 11 years ago
Closed 11 years ago
#20954 closed Bug (fixed)
Tutorial Doco Error
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
On the page "https://docs.djangoproject.com/en/1.5/intro/tutorial03/"
at the section "Write your first view"
It says to update the same file "polls/urls.py" twice, but with completely different code, even through it says to only add the "include".
First
from django.conf.urls import patterns, url
from polls import views
urlpatterns = patterns(,
url(r'$', views.index, name='index')
)
Second
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)),
)
The "final" second version errors.
Didn't read the detail that it was the same file in different folders.
Sorry.