I haven't think about it this way. It works (using "a_ptr__b").
Thank you for help Scott!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send em
Try:
myB = B.objects.get(pk=1)
myCs = C.objects.filter(a__b=myB)
Regards
Scott
> I have model A in which there is field ForeignKey(B). I also have
> model C which inherits from model A. None of these models is abstract.
> Having B object, can I find all C objects pointing to it? When I use
> som
Hello!
I have model A in which there is field ForeignKey(B). I also have
model C which inherits from model A. None of these models is abstract.
Having B object, can I find all C objects pointing to it? When I use
something like this: Bobject.C_set.all() there appears an error:
'AttributeError: B o
3 matches
Mail list logo