got rid of 'user_filters', moving towards putting filter-clause generators in the...
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 15 Jul 2010 00:55:46 +0000 (00:55 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Thu, 15 Jul 2010 00:55:46 +0000 (00:55 +0000)
commit8c717e5beea1a2c4afe65de1118d17f4b42c5ac9
tree79206d0f38ecc3e72426f59e870b727924480b5a
parentf4e4f13f9e0ed46a54391f4f9c073289d335cb3d
got rid of 'user_filters', moving towards putting filter-clause generators in the model.

So, if you want a clause that would show only Items accessible by the current user:

  accessible = Item.objects.filter(Item.filter_for_user(current_user))

filter_for_user() returns a Q() object, which can be combined using
binary ops to construct more complex queries.

git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@920 6d9bc8c9-1ec2-4278-b937-99fde70a366f
conifer/syrup/models.py
conifer/syrup/views/_common.py
conifer/syrup/views/general.py