Code

Opened 5 years ago

Closed 5 years ago

#11723 closed (duplicate)

Missed word to be removed.

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

Description (last modified by Alex)

The last example at the bottom, showing the urls.py:

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 not contain mysite. The correct would 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'),
)

as for decoupling.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by freenity

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Sorry, the code wasn't formatted.

The last example at the bottom, showing the urls.py:

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 not contain mysite. The correct would 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'),
)

as for decoupling.

comment:2 Changed 5 years ago by Alex

  • Description modified (diff)

Please use preview.

comment:3 Changed 5 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

"Last example at the bottom" of what?

I'm going to assume you mean the tutorial, in which case this is a duplicate of something that is regularly (and incorrectly) reported - see #11464, #11272, #9860, and about a dozen others.

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.