-
|
Let's say we have the following models: We can't set In fact, if model i'm not sure what the internal use of that property is, but how about we allow the name of the property to be overridden (via a method on the base class which could be overridden), or perhaps auto-generate a name like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This issue is caused by Django's way of dealing with model inheritance (see: https://docs.djangoproject.com/en/dev/topics/db/models/#specifying-the-parent-link-field) To have model inheritance, Django adds an implicit |
Beta Was this translation helpful? Give feedback.
This issue is caused by Django's way of dealing with model inheritance (see: https://docs.djangoproject.com/en/dev/topics/db/models/#specifying-the-parent-link-field)
django-polymorphic "mainly" adds improved retrieval of these objects, and form/admin interfaces.
To have model inheritance, Django adds an implicit
base_ptr = OneToOneField(Base, related_name='foo', primary_key=True, parent_link=True)field toFoothat acts as primary key to theBasemodel. When you explicitly define the key, you might be able to change therelated_nameso they don't clash with your properties.