Ticket #5216: label_tag.2.patch

File label_tag.2.patch, 619 bytes (added by anonymous, 17 years ago)
  • data/django/django/newforms/forms.py

     
    296296        If attrs are given, they're used as HTML attributes on the <label> tag.
    297297        """
    298298        contents = contents or escape(self.label)
     299        from django.utils.functional import Promise
     300        if isinstance(contents, Promise):
     301                contents = contents.__unicode__()
    299302        widget = self.field.widget
    300303        id_ = widget.attrs.get('id') or self.auto_id
    301304        if id_:
Back to Top