Maksymus007 schrieb:
> On Thu, Aug 27, 2009 at 1:22 PM, David Zhou<da...@nodnod.net> wrote:
>> On Thu, Aug 27, 2009 at 7:09 AM, Maksymus007<maksymus...@gmail.com> wrote:
>>> I've got two different form on the same page, under the same URL.
>>> When I send one of them, the second one gets validated too.
>>> I set prefixes but no change.
>>>
>>> Is there any way to distinguish between two forms, choosing one that
>>> have been submited?
>> Prefixes are for using the same form multiple times on a page,
>> avoiding name collisions.
>>
>> Post the part of your view that handles your forms.
>>
>> -- dz
>>
> 
> Nothing special
> 
>     if request.method == 'POST':
>         form = RegisterForm(request.POST)
>         if form.is_valid():
>              pass
> 
> And second one is handled by middleware, in similar way

You handle forms in a middleware? Why? Middleware code gets
executed for every http request ...

 Thomas

-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

--~--~---------~--~----~------------~-------~--~----~
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