I wanted to combine two models into one form so I created the
following

class UserForm( ModelForm ):
    class Meta:
        model = User
        fields = ('email','first_name','last_name')

class ProfileForm( ModelForm ):
    class Meta:
        model = Profile

class UserProfile ( UserForm, ProfileForm )
     class Meta( UserForm.Meta, ProfileForm.Meta)
          exclude = ('user',)

It only inherits UserForm

Is there a way to create one form using 2 modelform or to have
ProfileForm inherit from UserForm and add
Profile form data. Something like this

class ProfileForm( UserForm )
     class ( UserForm.Meta ):
          model = Profile





-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to