Jim Steil schrieb:
> Diez:
>
> What I am trying to do is have something like this:
>
> Whereclause = ''
> If parm1:
> Whereclause = x
> If parm2:
> Whereclause = whereclause + y
> If parm3:
> Whereclause = whereclause + z
No deal. Just do stuff like this (for example of course):
whereClauses = []
if condition:
whereClauses.append(Model.q.someProp == someValue)
if other_condition:
whereClauses.append(Model.q.someOtherProp == someOtherValue)
if whereClauses:
return Model.select(AND(*whereClauses))
else:
return Model.select()
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---