Opened 8 years ago

Closed 6 years ago

#6286 closed (fixed)

tutorial part 3 - Design your urls misses admin views

Reported by: Bashar Owned by: stugots
Component: Documentation Version: master
Severity: Keywords: tutorial
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by ramiro)

In Chapter 3 Design your urls section, the urlpatterns assignment seems to miss the admin url patter from the assignment:

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

Perhaps it's because the next step is to move that section to the polls directory, but it may lead people to overwrite the admin section unaware.

Attachments (2)

6286.patch (67.1 KB) - added by stugots 7 years ago.
6286.diff (1.6 KB) - added by timo 6 years ago.
fixed typo

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by arien

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

Duplicate of #6190.

comment:2 Changed 8 years ago by arien

  • Needs documentation set
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Triage Stage changed from Unreviewed to Accepted

Ugh... Sorry for the close. This isn't a duplicate of #6190, and moreover #6190 looks bogus. Reopening.

comment:3 Changed 8 years ago by arien

The admin views are not included in the urls.py on purpose. Including them would result in ViewDoesNotExist exceptions when trying to convert URLs to views, because the polls views haven't been written yet. This means the admin is not available until all the views are written (at the end of the section before Use generic views: Less code is better in the fourth part of the tutorial).

Adding a sentence that tells the reader to put the admin views back in when all the views are written (and maybe explaining why they were temporarily taken out?) would perhaps prevent confusion.

comment:4 Changed 8 years ago by arien

  • Keywords tutorial added; urls.py removed
  • Summary changed from Chapter 3 - Design your urls misses Admin section to tutorial part 3 - Design your urls misses admin views

comment:5 Changed 7 years ago by Tyler Mitchell <spatialguru@…>

Came across this too - as a new user reading the tutorial I got stumped. Wasn't sure whether to copy verbatim or leave it the admin pattern in there.

comment:6 Changed 7 years ago by stugots

  • Owner changed from nobody to stugots
  • Status changed from reopened to new

Changed 7 years ago by stugots

comment:7 Changed 7 years ago by stugots

  • Has patch set

Patch file attached.

Note, svn thinks every line changed due to bug #6545.

comment:8 Changed 7 years ago by stugots

  • Needs documentation unset

Oops, I forgot to clear "Needs documentation."

comment:9 Changed 7 years ago by stugots

  • Status changed from new to assigned

comment:10 Changed 7 years ago by ramiro

  • Description modified (diff)

comment:11 Changed 6 years ago by timo

  • Triage Stage changed from Accepted to Ready for checkin

Changed 6 years ago by timo

fixed typo

comment:12 Changed 6 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from assigned to closed

This was addressed independently in r10727 by just not dropping the admin line from the list. If it turns out people get confused trying to access admin before they've created the views to match what they've put in urls.py then we can add a note about that later.

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