Here are the examples of the python api django.db.models.F.bitor taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
View Complete Implementation : models.py
Copyright MIT License
Author : pennersr
Copyright MIT License
Author : pennersr
def _filter_flags(self, qs, flags):
if flags:
qry = None
for mask in flags:
q = Q(**{'flags': F('flags').bitor(mask)})
if not qry:
qry = q
else:
qry = qry | q
qs = qs.filter(qry)
return qs