djangosnippets.org: Latest snippets tagged with 'Q'https://djangosnippets.org/tags/q_1/2012-01-24T13:09:16.512298-06:00make a combined set of db.Q objects out of a list of dicts and an operator
2012-01-24T13:09:16.512298-06:00jdunckhttps://djangosnippets.org/snippets/2660/<p>It's often useful to dynamically create filter criteria, and Q objects are useful for that, but sometimes you need to make a combined Q composed of various alternates. This bit of code eases the awkwardness of creating the first Q so that there's a combiner, plus the odd case of …</p>
Freely redistributable