Code

Opened 6 years ago

Closed 6 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:

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

Attachments (0)

Change History (1)

comment:1 Changed 6 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.