Code

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10081 closed (duplicate)

In tutorial 3, url decoupling is incomplete

Reported by: krusty.ar@… Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: tutorial 3 urls routes
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

in tutorial 3, the last mention of polls/urls.py still references the site in wich it's installed, missing the point on decoupling:

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

Should be:

urlpatterns = patterns('polls.views',
    (r'^$', 'index'),
    (r'^(?P<poll_id>\d+)/$', 'detail'),
    (r'^(?P<poll_id>\d+)/results/$', 'results'),
    (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
)

I'm a complete newbie but that makes more sense to me (and it works).

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by programmerq

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

Duplicate of #9860

comment:2 Changed 5 years ago by ubernostrum

(and seeing as this was a duplicate of no less than six other tickets, it's time once again to ask that people please search the tracker before opening new tickets)

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.