#28563: Allow parent relations to specify the related_name of a class property
--------------------------------+--------------------------------------
Reporter: Samuel Spencer | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------+--------------------------------------
Comment (by Simon Charette):
I'm not convinced it's worth adding a `Meta` option for the rare cases
when this is required. Explicitly defining your parent link as you've
pointed out should do.
{{{#!python
class Property(Metadata):
metadata_ptr = OneToOneField(
Metadata,
on_delete=CASCADE,
parent_link=True,
related_name='property_subclass',
)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28563#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/073.1011efd185e3463480837aa06aa97823%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.