diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py index 3ffb85e6c63..b6d5bde932d 100644 --- a/django/contrib/admin/helpers.py +++ b/django/contrib/admin/helpers.py @@ -125,14 +125,16 @@ class AdminField(object): contents = conditional_escape(force_text(self.field.label)) if self.is_checkbox: classes.append('vCheckboxLabel') - else: - contents += ':' + if self.field.field.required: classes.append('required') if not self.is_first: classes.append('inline') attrs = {'class': ' '.join(classes)} if classes else {} - return self.field.label_tag(contents=mark_safe(contents), attrs=attrs) + # checkboxes should not have a label suffix as the checkbox appears + # to the left of the label. + return self.field.label_tag(contents=mark_safe(contents), attrs=attrs, + label_suffix='' if self.is_checkbox else None) def errors(self): return mark_safe(self.field.errors.as_ul()) diff --git a/django/forms/forms.py b/django/forms/forms.py index e144eb60f84..ad5daf44162 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -509,20 +509,23 @@ class BoundField(object): ) return self.field.prepare_value(data) - def label_tag(self, contents=None, attrs=None): + def label_tag(self, contents=None, attrs=None, label_suffix=None): """ Wraps the given contents in a