Ticket #17921: base_form_css_class.diff
File base_form_css_class.diff, 1.1 KB (added by , 13 years ago) |
---|
-
django/forms/forms.py
71 71 # class, not to the Form class. 72 72 def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, 73 73 initial=None, error_class=ErrorList, label_suffix=':', 74 empty_permitted=False): 74 empty_permitted=False, error_css_class='error', 75 required_css_class='required'): 75 76 self.is_bound = data is not None or files is not None 76 77 self.data = data or {} 77 78 self.files = files or {} … … 83 84 self.empty_permitted = empty_permitted 84 85 self._errors = None # Stores the errors after clean() has been called. 85 86 self._changed_data = None 87 self.error_css_class = error_css_class 88 self.required_css_class = required_css_class 86 89 87 90 # The base_fields class attribute is the *class-wide* definition of 88 91 # fields. Because a particular *instance* of the class might want to