Opened 11 years ago

Closed 11 years ago

#6982 closed (fixed)

modelforms incomplete example code

Reported by: Rho <darkrho@…> Owned by: nobody
Component: Documentation Version: master
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


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 Changed 11 years ago by James Bennett

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