Opened 8 years ago

Closed 8 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:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


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 8 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from new to closed

(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