> thanks doug, this is what I did, but I am not comfortable with it.
> those two button do different things, and if they're under one method
> on the views it could be ugly, what if I have 4 or 5 submit buttons?

Keep in mind there is nothing keeping one view from calling another.

def button1view(request):
   stuff

def view1(request):
   if request.POST and request.POST.has_key('button1'):
       return button1view(request)

More often I find myself doing helper functions to keep the logic
straight.

def button1_helper():
    return {'button1': True}

def view1(request):
   context_dict={}
   if request.POST:
       if request.POST.has_key('button1'):
           context_dict.update(button1_helper)
       ...


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

Reply via email to