views:

63

answers:

1

I have UserProfile model defined in settings.py. Now I want to create registration form that have fields both from User and UserProfile models. Is there easy way to do it?

I'm using uni_form to create nice looking forms if this helps.

+1  A: 

Just put two children of Form in the view and display them in the template. Use the prefix argument in the constructors to prevent field name collisions.

Ignacio Vazquez-Abrams
Problem is, my UserProfile has fields that should be visible between fields of User model (like "Title: Mr/Mrs"). Maybe will be easier to create form from UserProfile model and manually add fields missing from User model...
suda
Or you could just output the fields from the appropriate form yourself, in the order you need them.
Ignacio Vazquez-Abrams
But this will defeat whole purpose of using uni_form.
suda