Opened 17 years ago

Closed 17 years ago

#6982 closed (fixed)

modelforms incomplete example code

Reported by: Rho <darkrho@…> 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

Change History (1)

comment:1 by James Bennett, 17 years ago

Resolution: fixed
Status: newclosed

(In [7411]) Fixed #6982; added an import statement to example in docs/modelforms.txt for the ModelForm class

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