You realize that you could simply do something like this to check if
'somefield' is a key in request.POST?

   if 'somefield' in request.POST:
      ...

;-)

On Sun, Feb 8, 2009 at 10:52 AM, tsop <tso...@gmail.com> wrote:
> Oh thanks!
> I didn't realize you could do that, it works now.
> I am using request.POST.__contains__(key), I think this is what you
> meant. =)
>
> Titus
>
> On Feb 8, 4:25 am, Horst Gutmann <ze...@zerokspot.com> wrote:
>> You could also assign the submit buttons a name (each its own name),
>> check request.POST for that name and then validate the respective form
>> :-)
>>
>> -- Horst
>>
>> On Sun, Feb 8, 2009 at 10:18 AM, tsop <tso...@gmail.com> wrote:
>> > Hello,
>> > I have a small problem here, I want to display two forms on the same
>> > page and I need both forms to validate/submit independently from one
>> > another. The problem I am having is that there is no way to tell which
>> > form is being submitted to, if they are both left empty and one submit
>> > is clicked both raise validation errors.
>>
>> > Since the view and template is quite a bit of code I've pasted them to
>> > a pastebin:
>>
>> > The view:
>> >http://dpaste.com/118076/
>>
>> > The template:
>> >http://dpaste.com/118077/
>>
>> > King Regards,
>> > Titus
> >
>

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