#10961: Allow users to override forward and reverse relationships on proxy
models
with !ForeignKey fields.
-------------------------------------+-------------------------------------
Reporter: Tai Lee | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: proxy ForeignKey | Triage Stage: Accepted
reverse relationship manager |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by powderflask):
For others who land here looking for solutions...
IF there is a field on your model that can be used to determine which
Proxy subclass to initialize, this approach works beautifully:
https://schinckel.net/2013/06/13/django-proxy-model-state-machine/
No fuss, no overhead, every concrete object gets its correct proxy
subclass type. Limited use-case, but a nifty solution if you happen to
have it.
--
Ticket URL: <https://code.djangoproject.com/ticket/10961#comment:15>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018b5fd185a7-6d1e13a8-171d-4eb7-8656-42c0fa13a012-000000%40eu-central-1.amazonses.com.