Opened 8 years ago

Closed 8 years ago

#26000 closed Bug (worksforme)

Error in tutorial05 Django1.9

Reported by: Philip Cheong Owned by: nobody
Component: Documentation Version: 1.9
Severity: Normal Keywords: AttributeError DetailView pk slug
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After following the directions here:
https://docs.djangoproject.com/en/1.9/intro/tutorial05/

These two tests return the same error:

ERROR: test_detail_view_with_a_future_question (polls.tests.QuestionIndexDetailTests)

ERROR: test_detail_view_with_a_past_question (polls.tests.QuestionIndexDetailTests)

AttributeError: Generic detail view DetailView must be called with either an object pk or a slug.

Discovered this suggestion but didn't manage to get it to work.
Not sure what the correct solution should be.
http://chriskief.com/2012/12/29/django-generic-detailview-without-a-pk-or-slug/

Change History (1)

comment:1 by Tim Graham, 8 years ago

Resolution: worksforme
Status: newclosed

I think you probably make a mistake along the way, but you'll need to provide your project so that we can help identify the issue. Please see TicketClosingReasons/UseSupportChannels for ways to get help.

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