From 771d3ac3d7ce2d640ab45db1d70f801e6f1496bc Mon Sep 17 00:00:00 2001 From: sai-ganesh-03 Date: Wed, 13 Nov 2024 13:12:04 +0530 Subject: [PATCH] Added use_fieldset=True to all the admin widgets --- django/contrib/admin/widgets.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 74004a7ba7..67742470bf 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -27,6 +27,8 @@ class FilteredSelectMultiple(forms.SelectMultiple): catalog has been loaded in the page """ + use_fieldset = True + class Media: js = [ "admin/js/core.js", @@ -50,6 +52,8 @@ class FilteredSelectMultiple(forms.SelectMultiple): class BaseAdminDateWidget(forms.DateInput): + use_fieldset = True + class Media: js = [ "admin/js/calendar.js", @@ -66,6 +70,8 @@ class AdminDateWidget(BaseAdminDateWidget): class BaseAdminTimeWidget(forms.TimeInput): + use_fieldset = True + class Media: js = [ "admin/js/calendar.js", @@ -86,6 +92,7 @@ class AdminSplitDateTime(forms.SplitDateTimeWidget): A SplitDateTime Widget that has some admin-specific styling. """ + use_fieldset = True template_name = "admin/widgets/split_datetime.html" def __init__(self, attrs=None): @@ -102,10 +109,12 @@ class AdminSplitDateTime(forms.SplitDateTimeWidget): class AdminRadioSelect(forms.RadioSelect): + use_fieldset = True template_name = "admin/widgets/radio.html" class AdminFileWidget(forms.ClearableFileInput): + use_fieldset = True template_name = "admin/widgets/clearable_file_input.html" @@ -135,6 +144,7 @@ class ForeignKeyRawIdWidget(forms.TextInput): in a