Opened 17 years ago
Closed 17 years ago
#6982 closed (fixed)
modelforms incomplete example code
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ModelForm, notdefined, example | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Full example fails running with:
<type 'exceptions.NameError'>: name 'ModelForm' is not defined
The solution is to add at top:
from django.newforms.models import ModelForm
Note:
See TracTickets
for help on using tickets.
(In [7411]) Fixed #6982; added an import statement to example in docs/modelforms.txt for the ModelForm class