Code

Opened 2 years ago

Closed 6 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

Attachments (0)

Change History (2)

comment:1 Changed 2 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 6 months ago by claudep

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.