[sqlalchemy] exists for query

2011-11-18 Thread lestat
I often pass db query in template context, and in template I check if it exists, that render one html block, else other html block. Can I in sqlalchemy check existance of query? Now I simply call query.count() in template as temporary solution. For example: q =

Re: [sqlalchemy] exists for query

2011-11-18 Thread Robert Forkel
query.first() may do the trick. Regards Robert Am 18.11.2011 15:25 schrieb lestat lestatc...@googlemail.com: I often pass db query in template context, and in template I check if it exists, that render one html block, else other html block. Can I in sqlalchemy check existance of query?