I'd lean toward a wontfix. In particular, making changes in 
django/db/models/sql/query.py for a contrib app doesn't look like a good 
separation of concerns. Is there a downside to the alternative of adding 
the GenericRelation?

On Tuesday, April 10, 2018 at 3:38:53 AM UTC-4, Carlton Gibson wrote:
>
> 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/acf29f15-a3db-425f-b628-71e87e5d3725%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to