Re: Processing multiple forms on one page

2009-06-24 Thread Oleg Oltar
Thanks! I will try the first idea, will create separate views. But in this case, I will have to add user authentification code to all 3 views Now it looks like this: def user_profile(request, profile_name): currentUser = request.user owner = get_object_or_404(User, username = profi

Re: Processing multiple forms on one page

2009-06-24 Thread Daniel Roseman
On Jun 24, 6:45 am, Oleg Oltar 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 f

Re: Processing multiple forms on one page

2009-06-24 Thread Ian Lewis
Oleg, You can set a parameter in your post request that allows you to differentiate between the two POST requests. But a more clean approach would be to just have the different forms POST to different urls(views) and the redirect back to the profile page if there is an error or do whatever. Ian

Processing multiple forms on one page

2009-06-23 Thread Oleg Oltar
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 em