#9486: The goal is to make sure the required field's lable be bold ---------------------------+------------------------------------------------ Reporter: ctao | Owner: nobody Status: new | Milestone: post-1.0 Component: Uncategorized | Version: 1.0 Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------+------------------------------------------------ Here is the svn diff
Index: django/forms/forms.py =================================================================== --- django/forms/forms.py (revision 9084) +++ django/forms/forms.py (working copy) @@ -155,7 +155,13 @@ if self.label_suffix: if label[-1] not in ':?.!': label += self.label_suffix - label = bf.label_tag(label) or '' + + attrs = None + if bf.field.required: + attrs = {'class': 'required'} + + label = bf.label_tag(label, attrs) or '' + else: label = '' if field.help_text: -- Ticket URL: <http://code.djangoproject.com/ticket/9486> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---