Code quality.

pull/7/head
Ferry Boender 10 years ago
parent b951fa4fce
commit 851e20f204
  1. 2
      src/formdefinition.py
  2. 6
      src/formrender.py

@ -227,7 +227,7 @@ class FormDefinition(object):
"""
try:
value = form_values[field_def['name']]
except KeyError, err:
except KeyError:
raise ValidationError("Invalid file upload")
field_name = field_def['name']

@ -24,7 +24,8 @@ HTML_FIELD_CHECKBOX = u'''
</li>
'''
HTML_REQUIRED = u'''{} <abbr title="This field is required" class="required">•</span>'''
HTML_REQUIRED = u'{} <abbr title="This field is required" \
u"class="required">•</span>'
class FormRender(object):
@ -43,7 +44,8 @@ class FormRender(object):
u'max="{maxval}" step="any" name="{name}" '
u'value="{value}" class="{classes}" style="{style}" />',
"date": u'<input {required} type="date" name="{name}" value="{value}" '
u'min="{min}" max="{max}" class="{classes}" style="{style}" />',
u'min="{min}" max="{max}" class="{classes}" '
u'style="{style}" />',
"file": u'<input {required} type="file" name="{name}" '
u'class="{classes}" style="{style}" />',
"password": u'<input {required} type="password" minlength="{minlen}" '

Loading…
Cancel
Save