#11328: Bug in tutorial03
---------------------------+------------------------------------------------
Reporter: marcalj | Owner: nobody
Status: new | Milestone: 1.0.3
Component: Documentation | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
---------------------------+------------------------------------------------
http://docs.djangoproject.com/en/1.0/intro/tutorial03/#design-your-urls
When say: "Time for an example. Edit mysite/urls.py so it looks like
this:"
There's a sample code for file named "mysite/urls.py":
{{{
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'),
(r'^polls/(?P<poll_id>\d+)/results/$', 'mysite.polls.views.results'),
(r'^polls/(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
(r'^admin/(.*)', admin.site.root),
)
}}}
Should be:
{{{
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'),
(r'^polls/(?P<poll_id>\d+)/results/$', 'mysite.polls.views.results'),
(r'^polls/(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
)
}}}
The line with admin route is invalid without their include, etc. It raises
500 error.
Thanks.
--
Ticket URL: <http://code.djangoproject.com/ticket/11328>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---