Re: Processing multiple forms in same page

2008-08-25 Thread timc3

Well then you just test to see what fields are pulled back, but its
fine, its possible.

I am doing it for a forum.

On Aug 24, 2:51 am, Rodolfo <[EMAIL PROTECTED]> wrote:
> Just for curiosity, why would one have two forms in a single page?
> I don't think it is possible to submit the two in a shot.
>
> Maybe only of them is intended to be filled per access?
>
> []s
>
> Rodolfo
>
> On Aug 23, 4:38 pm, Archis <[EMAIL PROTECTED]> wrote:
>
> > Hi Everyone,
>
> > I am new to Django. I have page in which I have two forms. I am not
> > able to find a way how to differentiate between the post of the two
> > forms. I have separate functions to be called for post action of each
> > of these two forms. Can anyone provide a solution ?
>
> > Thanks
>
> > Archis
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Processing multiple forms in same page

2008-08-24 Thread Daniel Roseman

On Aug 24, 1:51 am, Rodolfo <[EMAIL PROTECTED]> wrote:
> Just for curiosity, why would one have two forms in a single page?
> I don't think it is possible to submit the two in a shot.
>
> Maybe only of them is intended to be filled per access?
>
> []s
>
> Rodolfo

You can't have two HTML forms per page, but you can have two *Django*
forms. You'd wrap them both in a single ... element, and
Django will sort out which fields belong where according to the
prefix. So yes, you can submit them both at the same time.
--
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Processing multiple forms in same page

2008-08-23 Thread Rodolfo

Just for curiosity, why would one have two forms in a single page?
I don't think it is possible to submit the two in a shot.

Maybe only of them is intended to be filled per access?

[]s

Rodolfo

On Aug 23, 4:38 pm, Archis <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I am new to Django. I have page in which I have two forms. I am not
> able to find a way how to differentiate between the post of the two
> forms. I have separate functions to be called for post action of each
> of these two forms. Can anyone provide a solution ?
>
> Thanks
>
> Archis

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Processing multiple forms in same page

2008-08-23 Thread timc3

In your view you need to send both forms with different names and then
in the template access each form.

Like so:

t = firstForm()
p = secondForm()

objContext = RequestContext(request, {'firstform': t,
'secondform': p})
return render_to_response('formtemplate.html', objContext)

Hope that helps

On Aug 23, 9:38 pm, Archis <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I am new to Django. I have page in which I have two forms. I am not
> able to find a way how to differentiate between the post of the two
> forms. I have separate functions to be called for post action of each
> of these two forms. Can anyone provide a solution ?
>
> Thanks
>
> Archis
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Processing multiple forms in same page

2008-08-23 Thread Archis

Hi Everyone,

I am new to Django. I have page in which I have two forms. I am not
able to find a way how to differentiate between the post of the two
forms. I have separate functions to be called for post action of each
of these two forms. Can anyone provide a solution ?

Thanks

Archis

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---