Code

Opened 4 years ago

Closed 4 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: UI/UX:

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.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by justinlilly

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.