Skip to content

Commit

Permalink
Remove Django<4 compat in FieldRenderer.get_label_html (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisfreitag authored Nov 29, 2024
1 parent 9227fc8 commit f3ae63c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/django_bootstrap5/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,7 @@ def get_field_html(self):
def get_label_html(self, horizontal=False):
"""Return value for label."""
label_html = "" if self.show_label == "skip" else self.field.label
if isinstance(self.widget, (RadioSelect, CheckboxSelectMultiple)):
# TODO: This is a fix for Django < 4, remove after we drop support for Django 3
label_for = None
else:
label_for = self.field.id_for_label
label_for = self.field.id_for_label
if label_html:
label_html = render_label(
label_html,
Expand Down

0 comments on commit f3ae63c

Please sign in to comment.