diff sat_website/forms.py @ 95:dc8a30f6c369

fixes the display of form results which was ignoring some labels
author souliane <souliane@mailoo.org>
date Thu, 25 Jun 2015 14:39:52 +0200
parents c1b77f07f644
children c868187b8d00
line wrap: on
line diff
--- a/sat_website/forms.py	Tue Jun 23 18:34:14 2015 +0200
+++ b/sat_website/forms.py	Thu Jun 25 14:39:52 2015 +0200
@@ -44,11 +44,11 @@
         super(BooleanField, self).__init__(*args, **kwargs)
 
 class CharField(forms.CharField):
-    def __init__(self, label=None, *args, **kwargs):
+    def __init__(self, *args, **kwargs):
         try:
             placeholder = kwargs.pop('placeholder')
         except KeyError:
-            placeholder = label
+            placeholder = kwargs['label']
 
         super(CharField, self).__init__(*args, **kwargs)
         self.widget.attrs.update({'class': "form-control",