Opened 9 years ago

Closed 9 years ago

Last modified 9 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

Change History (4)

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

comment:2 Changed 9 years ago by Brian Rosner

Resolution: invalid
Status: newclosed

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

comment:3 Changed 9 years ago by Marc Fargas

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 9 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.

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