Merge pull request #53 from stephane/fix-bootstrap-horizontal-arg

Fix dict created at compile time in bootstrap_horizontal
This commit is contained in:
tzangms 2015-03-09 22:58:02 +08:00
commit b8bf90d2c6

View File

@ -20,13 +20,9 @@ def bootstrap_inline(element):
@register.filter
def bootstrap_horizontal(element, label_cols={}):
if not label_cols:
label_cols = 'col-sm-2 col-lg-2'
def bootstrap_horizontal(element, label_cols='col-sm-2 col-lg-2'):
markup_classes = {'label': label_cols,
'value': '',
'single_value': ''}
markup_classes = {'label': label_cols, 'value': '', 'single_value': ''}
for cl in label_cols.split(' '):
splitted_class = cl.split('-')