Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6339 closed (invalid)

Documentation for ModelForm has an error

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

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 by shidan <shidan@…>, 17 years ago

comment:2 by Brian Rosner, 17 years ago

Resolution: invalid
Status: newclosed

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

comment:3 by Marc Fargas, 17 years ago

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 by shidan <shidan@…>, 17 years ago

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