Fixed #5937 -- When filtering on generic relations, restrict the target objects to...
commit8dc9446c1fac846eb4f42c967b4f299e37c37b95
authormtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Wed, 27 Aug 2008 05:22:33 +0000 (27 05:22 +0000)
committermtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Wed, 27 Aug 2008 05:22:33 +0000 (27 05:22 +0000)
tree4e535929ca860db1c5a030775c29475506af3505
parentf090e34e97f96c9df6efe21b897789d9d11fdab6
Fixed #5937 -- When filtering on generic relations, restrict the target objects to those with the right content type.

This isn't a complete solution to this class of problem, but it will do for
1.0, which only has generic relations as a multicolumn type. A more general
multicolumn solution will be available after that release.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
django/contrib/contenttypes/generic.py
django/db/models/sql/query.py
tests/modeltests/generic_relations/models.py