diff --git a/django/newforms/forms.py b/django/newforms/forms.py index 0b4687bcf3..5964c9cc5e 100644 --- a/django/newforms/forms.py +++ b/django/newforms/forms.py @@ -5,7 +5,7 @@ Form classes from django.utils.datastructures import SortedDict, MultiValueDict from django.utils.html import escape from fields import Field -from widgets import TextInput, Textarea, HiddenInput, MultipleHiddenInput +from widgets import flatatt, TextInput, Textarea, HiddenInput, MultipleHiddenInput from util import StrAndUnicode, ErrorDict, ErrorList, ValidationError __all__ = ('BaseForm', 'Form') @@ -247,17 +247,20 @@ class BoundField(StrAndUnicode): return self.field.widget.value_from_datadict(self.form.data, self.html_name) data = property(_data) - def label_tag(self, contents=None): + def label_tag(self, contents=None, attrs=None): """ Wraps the given contents in a