Ticket #5216: label_tag.4.patch
File label_tag.4.patch, 597 bytes (added by , 16 years ago) |
---|
-
django/forms/forms.py
371 371 """ 372 372 contents = contents or escape(self.label) 373 373 widget = self.field.widget 374 id_ = widget.attrs.get('id') or self.auto_id374 id_ = smart_unicode(widget.attrs.get('id', '')) or self.auto_id 375 375 if id_: 376 376 attrs = attrs and flatatt(attrs) or '' 377 377 contents = '<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, contents)