"Diez B. Roggisch" <[EMAIL PROTECTED]> writes:

> 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()

Using the filter method looks a lot cleaner to me...  And easier to see what
is happening.

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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

Reply via email to