Code

Opened 3 years ago

Closed 3 years ago

#16871 closed Uncategorized (invalid)

import error in docs

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

Description

In part 2 of the tutorial (https://docs.djangoproject.com/en/1.3/intro/tutorial02/), under the "Make the poll app modifiable in the admin" section, there is an error in the code block. The first import line reads: "from polls.models import Poll" but if the module is inside the polls directory, then this import fails. To get it to work, I had to change this line to "from models import Poll"

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by julien

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

Thanks a lot for the report, but the tutorial seems correct here. I suspect there might be an issue with how your Python path is set up. Please check again in part 1 of the tutorial. You may also ask for further assistance on http://groups.google.com/group/django-users

If you can resolve your issue and have suggestions for improving/clarifying the tutorial, please feel free to reopen this ticket.

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.