Code

Opened 3 years ago

Closed 3 years ago

#15192 closed (fixed)

1.2/tutorial04 refers to class-based generic views

Reported by: MixedContent Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I am the opposite of an expert, but I believe this is a doc problem.

IIUC, class-based generic views were introduced in Django 1.3, and prior to that time, generic views were function-based.

I am running Django 1.2.4.

The 1.1 tutorial04 refers to function-based generic views. The 1.2 tutorial04 refers to class-based generic views. The most obvious consequence of this, to the novice, is that attempting to run the example code that shows how to use generic views results in "ImportError at /polls ... cannot import name DetailView"

I believe this error was introduced recently, because if I remember correctly, I first encountered this message due to an error on my part, which was that I had inadvertently navigated to the tutorial(04) for the dev version, and that when I loaded the 1.2 tutorial instead, the example code was different, and ran properly.

Why I'm running through the same tutorial again is a reasonable question, but beyond the scope.

URL of doc page: http://docs.djangoproject.com/en/1.2/intro/tutorial04/

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by lrekucki

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

The source in repository: http://code.djangoproject.com/browser/django/branches/releases/1.2.X/docs/intro/tutorial04.txt#L241 looks correct. So does HTML generated from source. This is most likely an issue with the new site rendering the wrong version of docs. Ticket #15189 looks similar.

comment:2 Changed 3 years ago by lrekucki

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

The docs appear to be ok now, so closing this.

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.