Re: Design Decision: GFK Reverse Lookups

2018-04-18 Thread Adam Johnson
I agree, adding more functionality to the ORM for this one limited use case doesn't seem worth it, especially given GenericRelation's existence. On 18 April 2018 at 17:10, Tim Graham wrote: > I'd lean toward a wontfix. In particular, making changes in > django/db/models/sql/query.py for a contri

Re: Design Decision: GFK Reverse Lookups

2018-04-18 Thread Tim Graham
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

Design Decision: GFK Reverse Lookups

2018-04-10 Thread Carlton Gibson
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')