Opened 8 years ago

Closed 8 years ago

Last modified 8 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 8 years ago by shidan <shidan@…>

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

comment:2 Changed 8 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 8 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 8 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