Opened 14 years ago

Closed 14 years ago

#14142 closed (invalid)

Improvement (?) on tutorial part 3

Reported by: AMJ Owned by: nobody
Component: Documentation Version: 1.2
Severity: Keywords: Tutorial part 3
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In "Decoupling the URLconfs", where it says

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'),
)

It should say (IMHO)

from django.conf.urls.defaults import *  # <--- this line

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'),
)

That way, it should be clearer that its the whole decoupled file. I've not tested what happens if I let the admin stuff in both url.py files.

My two cents. Thanks you all.

Change History (1)

comment:1 by Justin Lilly, 14 years ago

Resolution: invalid
Status: newclosed

This isn't non-obvious. We show the full import list at the beginning of the document. It isn't reasonable to say that someone is going to lose that information during the course of reading the page so things should still be there.

Note: See TracTickets for help on using tickets.
Back to Top