#27317: Make Form subclasses combine Form.Media from all parents
-----------------------------+--------------------------------------
Reporter: James Pic | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Comment (by James Pic):
Thanks for re-centering the discussion. I understand this design decision.
However, explicit inheritance doesn't fix it:
{{{
In [3]: from django.forms.forms import Media
In [4]: class MediaA(Media):
...: js = ('jquery.js', 'a.js')
...:
In [5]:
In [5]: class MediaB(Media):
...: js = ('jquery.js', 'b.js')
...:
In [6]: class MediaC(MediaA, MediaB):
...: pass
...:
In [7]: MediaC.js
Out[7]: ('jquery.js', 'a.js')
}}}
Shouldn't we be expecting `MediaC.js = ('jquery.js', 'a.js', 'b.js')` here
? I can't think of any case where we wouldn't: this multiple inheritance
is after all, explicit.
--
Ticket URL: <https://code.djangoproject.com/ticket/27317#comment:3>
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/062.d099e0fa606e907fcc233c7ea39b4d5e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.