Re: OR operator in django view

2010-06-18 Thread Nick
Brilliant, thanks On Jun 18, 4:08 pm, Dennis Kaarsemaker wrote: > On vr, 2010-06-18 at 14:04 -0700, Nick wrote: > > > How would I write this conditional statement in a view? > > >     if not candidate.office_type == "USREP" or "USSEN" or "DJ" or > > "ASSOCDJ": > >         office = '%s' % (candida

Re: OR operator in django view

2010-06-18 Thread Dennis Kaarsemaker
On vr, 2010-06-18 at 14:04 -0700, Nick wrote: > How would I write this conditional statement in a view? > > if not candidate.office_type == "USREP" or "USSEN" or "DJ" or > "ASSOCDJ": > office = '%s' % (candidate.office_type_description) > else: > office = [] > > > As is s

OR operator in django view

2010-06-18 Thread Nick
How would I write this conditional statement in a view? if not candidate.office_type == "USREP" or "USSEN" or "DJ" or "ASSOCDJ": office = '%s' % (candidate.office_type_description) else: office = [] As is stands, it doesn't seem to be running through all of the OR operato