Closed codeout closed 6 years ago
Hi un1t, thanks for your great library.
I'd like to specify attrs in ResubmitFileWidget just like FileInput(attrs={'accept': 'image/*'}).
attrs
ResubmitFileWidget
FileInput(attrs={'accept': 'image/*'})
ImageField(widget=ResubmitFileWidget(attrs={'accept': 'image/*'}))
This PR allows us to reflect the given argument.
# https://github.com/django/django/blob/master/django/forms/widgets.py class Input(Widget): def __init__(self, attrs=None): if attrs is not None: attrs = attrs.copy() self.input_type = attrs.pop('type', self.input_type) super().__init__(attrs)
:+1:
Hi un1t, thanks for your great library.
I'd like to specify
attrs
inResubmitFileWidget
just likeFileInput(attrs={'accept': 'image/*'})
.This PR allows us to reflect the given argument.
Note: Inheritance hierarchy