On Feb 20, 2006, at 9:38 AM, Martin Ostrovsky wrote:
> <form action="/some_url/" method="POST">
>     <input type="submit" name="submit_action1">
>     <input type="submit" name="submit_action2">
> </form>
>
> I would want one python function to correspond to each of
> submit_action1 and submit_action2.

def my_view(request):
        if request.POST.has_key('submit_action1'):
                do_action_one(request)
        elif request.POST.has_key('submit_action2'):
                do_action_two(request)

Jacob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to