#28511 closed Uncategorized (invalid)

Documentation Error, Writing your first Django app, part 4, Polls/view.py

Reported by: upendra1997 Owned by: nobody
Component: Documentation Version: 1.11
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 vote function

In except Block:

except (KeyError, Choice.DoesNotExist):

It gives a error that

name 'Choice' is not defined

Change History (1)

comment:1 Changed 19 months ago by Claude Paroz

Resolution: invalid
Status: newclosed

You can see that Choice is imported at the top of the code snippet, so this is probably an error on your side.
Please use our support channels.

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