#9317: Return content type of child class when parent passed to
ContentType.objects.get_for_model
--------------------------+-------------------------------------------------
Reporter: svetlyak40wt | Owner: nobody
Status: new | Milestone:
Component: Contrib apps | Version: 1.0
Keywords: contenttype | Stage: Unreviewed
Has_patch: 1 |
--------------------------+-------------------------------------------------
There is a problem during inheritance, if I have:
{{{
class Parent(models.Model): pass
class Child(Parent): pass
class Child2(Parent): pass
}}}
Next create objects of Child and Child2 types.
After that for each of Parent.objects.all() I want to receive it's
ContentType. Obviously, that in case of this inheritance, I need to get
ContentType of Child or Child2 instead of Parent.
My patch add this 'virtual' behaviour to get_for_model method. Also it
includes two unittests for this behaviour.
--
Ticket URL: <http://code.djangoproject.com/ticket/9317>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---