Re: creating user and profile in just one form

2007-12-11 Thread l5x
I suppose that you should also check if the username isn't already taken. --~--~-~--~~~---~--~~ 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 uns

Re: creating user and profile in just one form

2007-12-11 Thread Simone Cittadini
Joe ha scritto: > I've done this but with a manually built form. > > You can just add the extra form fields to the template, then reference > those extra fields in your view. > Yes, after trying with inline options to no result, I've resolved too in using the fields instead of the form to hav

Re: creating user and profile in just one form

2007-12-10 Thread Joe
I've done this but with a manually built form. You can just add the extra form fields to the template, then reference those extra fields in your view. new_data['your_new_fieldname'] will work as expected. In your view you might first create the user object - then create the customer object rela

creating user and profile in just one form

2007-12-10 Thread Simone Cittadini
I have this code to add a new user : class CustomerForm(ModelForm): class Meta: model = CustomerProfile def add(request): [..] if request.method == 'POST': form = CustomerForm(customer, request.POST) f.save() else: form = Cu