On Jun 24, 6:45 am, Oleg Oltar <oltarase...@gmail.com> wrote: > Hi! > > I am writing a small application for user profile management. > > I need to display and to process output from 2 form on the page of own > profile. How can I do it? > > 1. Form if to change avatar. (Contains browse and upload buttons) > 2. Form is for changing user details, e.g. info field, or maybe emails > > I want these form to be processed independently. E.g. user can submit > one without filling another. > > I have read a post about similar problem > here:http://groups.google.com/group/django-users/browse_thread/thread/1ff0... > but didn't find a solution for me. > > e.g. if we have following code: > if request.method == 'POST': > form1 = RegistrationForm(request.POST) > form2 = .......(request.POST) > > How to process them? Mean one of them will be empty, and it means I > don't need to return an error in that case. > Actually, I need to understand which of them is in post. But how? > > Thanks, > Oleg
You need to use the 'prefix' parameter when instantiating the form. http://docs.djangoproject.com/en/dev/ref/forms/api/#prefixes-for-forms -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---