Code

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6339 closed (invalid)

Documentation for ModelForm has an error

Reported by: shidan Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the example it says:

from django.newforms import ModelForm

it should be:

from django.newforms.models import ModelForm

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by shidan <shidan@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by brosner

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

The documentation is correct. from django.newforms import ModelForm works just fine.

comment:3 Changed 6 years ago by telenieko

The syntax is valid since [4103]; Maybe you were reading the online documentation? Remember it's for "trunk".

Replying to shidan:

In the example it says:

from django.newforms import ModelForm

it should be:

from django.newforms.models import ModelForm

comment:4 Changed 6 years ago by shidan <shidan@…>

Yes it was a mistake on my part. I tried it with 0.96 and it didn't work and I just saw in SVN that the class was in models.py in newforms so I assumed that it was just a namespace error. After upgrading to head it worked fine. Thanks.

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.