web/formwidgets.py
branchstable
changeset 7255 cbd7b2f49dc9
parent 7231 18bcb98d129a
child 7411 238da9684f99
--- a/web/formwidgets.py	Thu Apr 21 17:25:32 2011 +0200
+++ b/web/formwidgets.py	Wed Apr 27 09:55:17 2011 +0200
@@ -478,11 +478,12 @@
     default <br/> is used.
     """
     type = 'checkbox'
+    default_separator = u'<br/>\n'
     vocabulary_widget = True
 
-    def __init__(self, attrs=None, separator=u'<br/>\n', **kwargs):
+    def __init__(self, attrs=None, separator=None, **kwargs):
         super(CheckBox, self).__init__(attrs, **kwargs)
-        self.separator = separator
+        self.separator = separator or self.default_separator
 
     def _render(self, form, field, renderer):
         curvalues, attrs = self.values_and_attributes(form, field)