Ambiguity in the tutorial about decoupling the URLs
|Reported by:||anonymouse||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
On the third page of the tutorial there is an instruction to remove some lines in the newly decoupled urls.py file.
Now that we've decoupled that, we need to decouple the 'mysite.polls.urls' URLconf by removing the leading "polls/" from each line, and removing the lines registering the admin site: urlpatterns = patterns('mysite.polls.views', (r'^$', 'index'), (r'^(?P<poll_id>\d+)/$', 'detail'), (r'^(?P<poll_id>\d+)/results/$', 'results'), (r'^(?P<poll_id>\d+)/vote/$', 'vote'), )
The documentation reads as though the new file should only contain that information, but if you only have that django will not function because it is missing the
from django.conf.urls.defaults import *
line at the top.