views:

66

answers:

1

hi can any body send me a complete tutorial about how to create a model form in django. i tried to create a form from here . "http://docs.djangoproject.com/en/dev/topics/forms/modelforms/" but it returns an error saying "name 'ModelForm' is not defined" any suggestions plzzzz

+4  A: 

If a name is missing then it needs to be either imported or defined.

From the very first line of code on that page:

>>> from django.forms import ModelForm
Ignacio Vazquez-Abrams
yeah thats great..............!thaks i was only importing forms >>>from django import formsrather then >>>from django.forms import ModelFormthaks for the help
MajorGeek