Update forms.py
added sane default for non standard parameter `field_args`
This commit is contained in:
parent
68d16991cd
commit
979e8914da
4
forms.py
4
forms.py
@ -6,8 +6,8 @@ from wtforms.fields.html5 import TelField as _TelField, EmailField as _EmailFiel
|
||||
class AddArgsMixin(object):
|
||||
_field_args = {}
|
||||
|
||||
def __init__(self, name, field_args, *args, **kwargs):
|
||||
self._field_args = field_args
|
||||
def __init__(self, name, field_args=None, *args, **kwargs):
|
||||
self._field_args = field_args or {}
|
||||
super(AddArgsMixin, self).__init__(name, *args, **kwargs)
|
||||
|
||||
class StringField(AddArgsMixin, _StringField):
|
||||
|
Loading…
Reference in New Issue
Block a user