Opened 3 years ago

Closed 18 months ago

#17149 closed Cleanup/optimization (fixed)

MediaDefiningClass not used as base class for other form meta classes

Reported by: bradley.ayers@… Owned by: nobody
Component: Forms Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I think django.forms.widgets.MediaDefiningClass should be a base class for django.forms.forms.DeclarativeFieldsMetaclass and django.forms.models.ModelFormMetaclass

Change History (2)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

This code is duplicated in the __new__ method of these classes:

        if 'media' not in attrs:
            new_class.media = media_property(new_class)

comment:2 Changed 18 months ago by claudep

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top