Re: one form, many submits

2014-06-26 Thread Roman Klesel
>From your code: """ if request.method=='GET': if request.POST.get('accept'): bid = QuotedItem.objects.get(id=2) return render(request, 'bills/p_bill.html', {'bid' : bid}) """ if the method is "GET", you will never have any POST parameters. If you want POST para

Re: one form, many submits

2014-06-26 Thread Gunpreet Ahuja
On Tuesday, June 24, 2014 11:21:23 PM UTC+5:30, Gunpreet Ahuja wrote: > > > > On Saturday, February 20, 2010 9:07:57 PM UTC+5:30, David De La Harpe > Golden wrote: >> >> On Sat, Feb 20, 2010 at 06:42:11AM -0800, Tom wrote: >> >> > >> Check request.POST.get('cancel') to see if cancel was clicke

Re: one form, many submits

2014-06-24 Thread Gunpreet Ahuja
On Saturday, February 20, 2010 9:07:57 PM UTC+5:30, David De La Harpe Golden wrote: > > On Sat, Feb 20, 2010 at 06:42:11AM -0800, Tom wrote: > > > Check request.POST.get('cancel') to see if cancel was clicked, > and request.POST.get('accept') to see if accept was clicked. > This was really h

Re: one form, many submits

2010-02-20 Thread Timothy Kinney
You could also go with a column called "Execute" and a checkbox for the actions you want to execute and then a single submit button that grabs all the checked actions. But I think the other way is probably more intuitive. -Tim On Sat, Feb 20, 2010 at 10:45 AM, Tom wrote: > David, thanks for th

Re: one form, many submits

2010-02-20 Thread Tom
David, thanks for that. I ended up going for the simple HTML method because, as you guessed, the SubmitField idea was a bit unwieldy for my needs. Thanks for your help! Tom On 20 Feb, 15:37, David De La Harpe Golden wrote: > On Sat, Feb 20, 2010 at 06:42:11AM -0800, Tom wrote: > > Hi all, > >

Re: one form, many submits

2010-02-20 Thread David De La Harpe Golden
On Sat, Feb 20, 2010 at 06:42:11AM -0800, Tom wrote: > Hi all, > > I have a view that iterates over a queryset to produce a list of > items. I have added a checkbox next to each item (from within the > template) and have multiple 'submit' buttons that will do different > things with the items sel

one form, many submits

2010-02-20 Thread Tom
Hi all, I have a view that iterates over a queryset to produce a list of items. I have added a checkbox next to each item (from within the template) and have multiple 'submit' buttons that will do different things with the items selected. For example, one button will delete all the items selecte