On Tuesday 08 December 2015 23:38:26 Tim Graham wrote:
> I'm having trouble understanding the problem. Could you give some example
> models and code that demonstrates it?
> 

If I get things right:

class Parent(Model):
        content_type = ForeignKey('ContentType')

class Child(Model):
        parent = ForeignKey(Parent)
        object_id = IntegerField()
        # The next does not exist and they want it
        egfk = ExtendedGenericForeignKey('parent__content_type', 'object_id')

I suspect that this is a little too baroque for django core, and further, it 
should be possible to implement in user code. Note that GenericForeignKey 
itself is not part of Django core, but a contrib app; there should be no 
reason why you cannot do what it does (with the only possible exception being 
admin support).

If you try to do that and find that you are missing something, or need to use 
undocumented, private APIs, you'll have a very strong case for having those 
problems solved.

Of course, if this is not what you had in mind, please correct my 
misunderstanding.

HTH,
        Shai.

Reply via email to