Commit e80488b6 by Oscar Vilaplana

Added min_length and max_length

parent edbf65c0
...@@ -137,7 +137,8 @@ def humanize_field(field): ...@@ -137,7 +137,8 @@ def humanize_field(field):
'type': humanize_field_type(field.__class__), 'type': humanize_field_type(field.__class__),
'required': getattr(field, 'required', False), 'required': getattr(field, 'required', False),
} }
optional_attrs = ['read_only', 'help_text', 'label'] optional_attrs = ['read_only', 'help_text', 'label',
'min_length', 'max_length']
for attr in optional_attrs: for attr in optional_attrs:
if getattr(field, attr, None) is not None: if getattr(field, attr, None) is not None:
humanized[attr] = getattr(field, attr) humanized[attr] = getattr(field, attr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment