From 851e20f2040f1b38f843ebe4af17f61a231061e5 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Thu, 2 Jul 2015 08:14:36 +0200 Subject: [PATCH] Code quality. --- src/formdefinition.py | 2 +- src/formrender.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/formdefinition.py b/src/formdefinition.py index 4025510..f9ce6f0 100644 --- a/src/formdefinition.py +++ b/src/formdefinition.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'] diff --git a/src/formrender.py b/src/formrender.py index 339c93a..95bd7ba 100644 --- a/src/formrender.py +++ b/src/formrender.py @@ -24,7 +24,8 @@ HTML_FIELD_CHECKBOX = u''' ''' -HTML_REQUIRED = u'''{} •''' +HTML_REQUIRED = u'{} •' 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'', + u'min="{min}" max="{max}" class="{classes}" ' + u'style="{style}" />', "file": u'', "password": u'