#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 Tim Graham):
I'm not sure if that's a good idea.
[https://docs.djangoproject.com/en/stable/topics/forms/modelforms/#form-
inheritance As the documentation says about Meta], "Normal Python name
resolution rules apply. If you have multiple base classes that declare a
Meta inner class, only the first one will be used. This means the child’s
Meta, if it exists, otherwise the Meta of the first parent, etc." There
was a [https://groups.google.com/d/topic/django-
developers/imjaHrfk6Eo/discussion slightly related thread] on django-
developers were it was discussed that model Meta inheritance should be
explicit rather than automatic. Can you think of any precedents in Django
where automatic merging similar to what you proposed takes place?
By the way, we're thinking about ways to replace `Media` with a better
solution, although no solution seems imminent (#22298).
--
Ticket URL: <https://code.djangoproject.com/ticket/27317#comment:2>
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.fe2bd4a77900468d49256c51c13b0a53%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.