Re: radio button assignment as filter in search

2009-03-09 Thread Alex Gaynor
On Mon, Mar 9, 2009 at 12:10 PM, Jesse wrote: > > The problem is that the python converts the andor value to a > character, even though the radio button is presenting it as numeric. > I needed to place quotes around the number: > if andor == '1' and then it works. Hope this helps someone else. >

Re: radio button assignment as filter in search

2009-03-09 Thread Jesse
The problem is that the python converts the andor value to a character, even though the radio button is presenting it as numeric. I needed to place quotes around the number: if andor == '1' and then it works. Hope this helps someone else. --~--~-~--~~~---~--~~ You

Re: radio button assignment as filter in search

2009-03-09 Thread Jesse
Template: {% for pathology in pathology_list %} {{ pathology.pathology }} {% endfor %} There are actually three search selects(pathology, commodity, technology) The user can do and/or for a mix or match of the three, which is why I need the and/or option in the views.py.

Re: radio button assignment as filter in search

2009-03-09 Thread Alex Gaynor
On Mon, Mar 9, 2009 at 11:04 AM, Jesse wrote: > > Hello, > > I have a radio button in template for a search "AND" or "OR" > selection, with the name andor1 values 1 (or) and 2 (and) > > > > In the views.py: > def Bypub(request): >andor1 = request.POST['andor1'] >list=[] > andlist=[]

radio button assignment as filter in search

2009-03-09 Thread Jesse
Hello, I have a radio button in template for a search "AND" or "OR" selection, with the name andor1 values 1 (or) and 2 (and) In the views.py: def Bypub(request): andor1 = request.POST['andor1'] list=[] andlist=[] for publication in pub1: if andor1 == 1:# this assign