Hi All.

https://github.com/django/django/pull/9748 adds the ability to perform 
simple queries on a generic foreign key: 

    TaggedItem.objects.filter(content_object=object_instance)

You still can't do anything more complex, such as:

    TaggedItem.objects.get(content_object__name='Diamond')

This is a long standing 
Someday/Maybe: https://code.djangoproject.com/ticket/3006



The patch seems more or less OK to me but I'm not sure if we shouldn't 
*instead* guide users firmly towards defining a GenericRelation. 

GenericRelation provides for the more powerful querying, and, this way, 
provides the one correct way™ to do things. 

I'm wondering what the correct view should be: whether we take this patch 
or close the issue as wontfix and solely recommend GenericRelation. 



Thanks for your input. 

Kind Regards,

Carlton

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c81e6d2d-7254-4ad5-b8dd-c8c05726f55c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to