From 61e302814434294f1a1f41482c33f17dcf54d1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= Date: Thu, 24 Apr 2014 18:28:12 +0200 Subject: [PATCH] Fix dict created at compile time in bootstrap_horizontal --- bootstrapform/templatetags/bootstrap.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bootstrapform/templatetags/bootstrap.py b/bootstrapform/templatetags/bootstrap.py index 8c36c18..fecabdc 100644 --- a/bootstrapform/templatetags/bootstrap.py +++ b/bootstrapform/templatetags/bootstrap.py @@ -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(' '): splited_class = cl.split('-')