django-unfold 0.64.2__py3-none-any.whl → 0.65.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_unfold-0.64.2.dist-info → django_unfold-0.65.0.dist-info}/METADATA +1 -1
- {django_unfold-0.64.2.dist-info → django_unfold-0.65.0.dist-info}/RECORD +18 -18
- unfold/admin.py +14 -15
- unfold/contrib/constance/templates/admin/constance/change_list.html +18 -18
- unfold/contrib/constance/templates/admin/constance/includes/results_list.html +13 -11
- unfold/dataclasses.py +1 -0
- unfold/mixins/base_model_admin.py +1 -1
- unfold/sites.py +2 -5
- unfold/static/unfold/css/styles.css +1 -1
- unfold/templates/admin/change_form.html +6 -2
- unfold/templates/unfold/helpers/header_back_button.html +1 -1
- unfold/templates/unfold/helpers/pagination_infinite.html +1 -1
- unfold/templates/unfold/helpers/site_dropdown.html +1 -1
- unfold/templatetags/unfold.py +28 -15
- unfold/views.py +2 -0
- unfold/widgets.py +2 -0
- {django_unfold-0.64.2.dist-info → django_unfold-0.65.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.64.2.dist-info → django_unfold-0.65.0.dist-info}/WHEEL +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
unfold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
unfold/admin.py,sha256=
|
2
|
+
unfold/admin.py,sha256=5U_q83esGoCCkZJGOsNKRDFXlHTUbrk3tDWizOFgce4,7402
|
3
3
|
unfold/apps.py,sha256=SlBXPYrUd2uXn67qFbRvbXSUk3XFWrF4-5WELgDCvho,381
|
4
4
|
unfold/checks.py,sha256=e5HEhbXRcu3FwZDT_d-IbimeVpjJ6jgCUPXWvsUjEw0,2601
|
5
5
|
unfold/components.py,sha256=vqkQzseYUvLXDohmTVAlbKopALjyX4WA9yglvdfhqu4,1283
|
@@ -7,8 +7,8 @@ unfold/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
unfold/contrib/constance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
unfold/contrib/constance/apps.py,sha256=636jGQ_C15fp5WRccmuSeZCZ4GOQ2PhXSEe4769uqrQ,139
|
9
9
|
unfold/contrib/constance/settings.py,sha256=SuEMNoEHjCiC3TrdQirKP6Uw17nuTaReKOTGiFjgAR4,785
|
10
|
-
unfold/contrib/constance/templates/admin/constance/change_list.html,sha256=
|
11
|
-
unfold/contrib/constance/templates/admin/constance/includes/results_list.html,sha256=
|
10
|
+
unfold/contrib/constance/templates/admin/constance/change_list.html,sha256=qIt5tQBT6i5f3duGMcMmUvrzcQzaUtZ5ZfcPh61VeWg,2342
|
11
|
+
unfold/contrib/constance/templates/admin/constance/includes/results_list.html,sha256=F65allHYz2QNzvR5sdwabjZBwXMkfTuofHWjhO98X2I,3781
|
12
12
|
unfold/contrib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
unfold/contrib/filters/admin/__init__.py,sha256=7pooAoA2Y9MbBL_RTJBZeIAwV5ECrOvMbe0_egoHfew,1663
|
14
14
|
unfold/contrib/filters/admin/autocomplete_filters.py,sha256=Jh3m3iQ8YubZRQDVzHPGfpk9RulOhHkZc0N7L6KV9wc,514
|
@@ -86,7 +86,7 @@ unfold/contrib/simple_history/templates/simple_history/object_history.html,sha25
|
|
86
86
|
unfold/contrib/simple_history/templates/simple_history/object_history_form.html,sha256=TuQ_Fwrefjo3p9A-2asBxVq9bRJ9j5r11Jy-uS7K0TU,751
|
87
87
|
unfold/contrib/simple_history/templates/simple_history/object_history_list.html,sha256=kMtxD5II32etsk05IArxe_wGvVjrizMVVH8uRl5RjR0,6816
|
88
88
|
unfold/contrib/simple_history/templates/simple_history/submit_line.html,sha256=PEoPmWcWiiBIMs6XtXcoXswDtxp3FgntR3maieLDt4Y,1618
|
89
|
-
unfold/dataclasses.py,sha256=
|
89
|
+
unfold/dataclasses.py,sha256=XDQp7fcvto7YC8A68tc6TUhXY7s3je9nm3AVUdxrJ7Y,859
|
90
90
|
unfold/decorators.py,sha256=jPiYFy1p0WGFn68VZhAZkYCPDF7argb9SDFaH6aemHk,4922
|
91
91
|
unfold/enums.py,sha256=9sTfyEycMWeoGPBa-ft6ZhQGnW1vkFg108RMBVf9nko,187
|
92
92
|
unfold/exceptions.py,sha256=gcCj1ox61E137bk_0Cqy4YC3SttdPgB-fiJUqpmyHSE,43
|
@@ -95,17 +95,17 @@ unfold/forms.py,sha256=0u4TFw7oQ96S7njzJ2G79Qzt1X-4P4px-kfMgjVt49o,7762
|
|
95
95
|
unfold/layout.py,sha256=Q-dFTA6UlvvPCA4PsGyTkHQmBLO7PL56xBfZi-bdt0c,1459
|
96
96
|
unfold/mixins/__init__.py,sha256=YlhoDs9Y_DXQ8Ejr3enxuHMS1-Ij9fwukxNwpeOS4Co,190
|
97
97
|
unfold/mixins/action_model_admin.py,sha256=9Zt4FLrQWEQSO2vrpwjzpFo_I3_yE000uEwHndsW5kg,12365
|
98
|
-
unfold/mixins/base_model_admin.py,sha256=
|
98
|
+
unfold/mixins/base_model_admin.py,sha256=Vr_Sd4xEsdekeKX8N70oiheYBzk2EwXbOX_frRw4JnE,4802
|
99
99
|
unfold/overrides.py,sha256=ERVY9boZiXgjDYcTEZcIp7KWoeBZ45VM_zN31yAOjyQ,2922
|
100
100
|
unfold/paginator.py,sha256=bZiEY-1kqZy_6CYGs9fHo6WntMgpnFCH-LJPoXkEESk,533
|
101
101
|
unfold/sections.py,sha256=Lcg3xCZ76fqjm4vD4x7YdE5VsbTKluL-sX5QTEBlHxA,2379
|
102
102
|
unfold/settings.py,sha256=o_yjhM1OgW2KSrae4oeUqjLw3lI9HZ1lkKGUW4nuC4Q,3432
|
103
|
-
unfold/sites.py,sha256=
|
103
|
+
unfold/sites.py,sha256=wLkyX5YZ3xPL4z6_G24OzB1SpnwyVfFJ43pNbkuCH2U,20272
|
104
104
|
unfold/static/admin/js/admin/RelatedObjectLookups.js,sha256=ubKKhWmX_QborwPnaLHuQshTwQw6tK1pAViWdKIjw4E,9222
|
105
105
|
unfold/static/admin/js/inlines.js,sha256=UXtFzCWHZWIJbxRghlNsNsz8HuRHjcaH1Mvb5e6uJms,16222
|
106
106
|
unfold/static/unfold/css/simplebar/LICENSE,sha256=okNJf6UFl2NrEiC4iqORNBa16IKgUgV88acdcl9FbtY,1081
|
107
107
|
unfold/static/unfold/css/simplebar/simplebar.css,sha256=5LLaEM11pKi6JFCOLt4XKuZxTpT9rpdq_tNlaQytFlU,4647
|
108
|
-
unfold/static/unfold/css/styles.css,sha256=
|
108
|
+
unfold/static/unfold/css/styles.css,sha256=KrvoWomHoeiubyHqvKFVKGsSaQHMs5Sku5bgq2YFp8M,159921
|
109
109
|
unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=-oiBJ7baAVtlVp8DUfO1w5GtkokElR8cIOn4RiqNleo,114840
|
110
110
|
unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=D_PpRhThST61VjFP0keubEqFp3g7TMhr5TmUDPg_Kkg,114348
|
111
111
|
unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=4G9rG8VTqupORmgCPtCrChRxKcMQf1Ebx9A9NhsK4IU,111268
|
@@ -137,7 +137,7 @@ unfold/templates/admin/auth/user/add_form.html,sha256=-_YY4guGdAbw2rCskrQfRAAvQF
|
|
137
137
|
unfold/templates/admin/auth/user/change_password.html,sha256=3NIopJ8JFN4iv428kUTqRthZvmden9sb0-D7AKohRjA,1577
|
138
138
|
unfold/templates/admin/base.html,sha256=CuttiTMMtEiPNIEv4VXt27UGITgqPZaz5V8BJlBEOdk,1663
|
139
139
|
unfold/templates/admin/base_site.html,sha256=UOsecaCycpyn_ygJNIKO7MQtDFJuHv--r83-mzaVY30,300
|
140
|
-
unfold/templates/admin/change_form.html,sha256=
|
140
|
+
unfold/templates/admin/change_form.html,sha256=yY0XLtN52_XHN5EofvQ1bGdhlkG38qhDvGxePhM1_Ak,4690
|
141
141
|
unfold/templates/admin/change_form_object_tools.html,sha256=eyeH-i2HgEM0Yi-OJA2D1VnKJyC19A_my1IDGxxoP8Y,593
|
142
142
|
unfold/templates/admin/change_list.html,sha256=aesNLu_b4j90Q08nWpMlVembYuH0TMGhwO7DJMMrSsI,4503
|
143
143
|
unfold/templates/admin/change_list_object_tools.html,sha256=cmMiT2nT20Ph5yfpj9aHPr76Z-JP4aSXp0o-Rnad28s,147
|
@@ -211,7 +211,7 @@ unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=F-s-4imtLbp2IYad3lFcD
|
|
211
211
|
unfold/templates/unfold/helpers/form_errors.html,sha256=mrv2_J7RPcLfVtoN1UHh3rfUyOSZpHl67wk1UGqtPcY,266
|
212
212
|
unfold/templates/unfold/helpers/form_label.html,sha256=7FfaXfviQmqKpsA1E7NSwM8rJiMNLl9e73XQram0Pfs,249
|
213
213
|
unfold/templates/unfold/helpers/header.html,sha256=cHAPz7niLLQDQbrZpURZS1hiA8OYLzkGaqnYzjgv8aE,1151
|
214
|
-
unfold/templates/unfold/helpers/header_back_button.html,sha256=
|
214
|
+
unfold/templates/unfold/helpers/header_back_button.html,sha256=axtIbVUtRZ5gDXL7q-TdzCLbzen3kWyOernQDXoHb-g,730
|
215
215
|
unfold/templates/unfold/helpers/header_title.html,sha256=-H3x6au-ZmMV1Y-HDeOs66MsL0XGKwQxYRnmDGuR268,510
|
216
216
|
unfold/templates/unfold/helpers/help_text.html,sha256=fDsSptYt6aPO3xPdMgbpwaINaF1FGFmaOb_1FiS_Bsg,118
|
217
217
|
unfold/templates/unfold/helpers/history.html,sha256=qxfCZxFIyl91qDpxfwozhmyVFZwULysA8Y_2H8XJ7bM,1937
|
@@ -231,14 +231,14 @@ unfold/templates/unfold/helpers/pagination.html,sha256=cvD4Jtw1YeKcgvWuY10iyM9Qj
|
|
231
231
|
unfold/templates/unfold/helpers/pagination_current_item.html,sha256=4cZ2KLVcP0Y7xuGyXgexDQ07r94cgM5Gnmtv11dkRPQ,69
|
232
232
|
unfold/templates/unfold/helpers/pagination_default.html,sha256=pseTrqaG5EOn_IpCy0GXNht3ickSkZYJ4lJaocZeI6A,496
|
233
233
|
unfold/templates/unfold/helpers/pagination_ellipsis.html,sha256=8g0KUUKtqRkXx_EBLGtsJsiYQO4tPS3GazZjxT90e0M,56
|
234
|
-
unfold/templates/unfold/helpers/pagination_infinite.html,sha256=
|
234
|
+
unfold/templates/unfold/helpers/pagination_infinite.html,sha256=OPX_UliZvyN2hoCI2EYTFMSTZDVitTJdlSFZyv55i7U,633
|
235
235
|
unfold/templates/unfold/helpers/pagination_inline.html,sha256=mMiqoYTmLjN2DFoen46EWHyP-b61staMG6WiaZn-YxI,1889
|
236
236
|
unfold/templates/unfold/helpers/popup_header.html,sha256=IDR9B0OO6v6TvJggeof-OMGJ4cYK2INStU_2a1AlWfM,1325
|
237
237
|
unfold/templates/unfold/helpers/search.html,sha256=Fpft3UmIH2EVI3_Jt66-ot42eTGj90cU5kns8XNHe5k,3070
|
238
238
|
unfold/templates/unfold/helpers/search_results.html,sha256=9FXx8fiByx0K2o8x2y8n0Wv-9kRUWk0y2PYu9raK1es,833
|
239
239
|
unfold/templates/unfold/helpers/shortcut.html,sha256=K71_vp9qvY5gSsTgDP-9rivneSKAP5uWbfUnIpiwMBM,217
|
240
240
|
unfold/templates/unfold/helpers/site_branding.html,sha256=_hhWQZqUrMYGqRJRpeANjbRJPfCROPZkQLZLV7FiRk8,268
|
241
|
-
unfold/templates/unfold/helpers/site_dropdown.html,sha256=
|
241
|
+
unfold/templates/unfold/helpers/site_dropdown.html,sha256=grU49elBhFKokJ1uDfzHLlwP1rzLnyDFOw1mw1CKpos,1049
|
242
242
|
unfold/templates/unfold/helpers/site_icon.html,sha256=q9YynbaAZsEXKXT3SDZy54iSdjUwR6i2vo0AFyllGQ0,1490
|
243
243
|
unfold/templates/unfold/helpers/site_logo.html,sha256=S_QJoT2qh0xw0ciaKxoT4GJ6QIH5eqgRSC0abbWWkOI,423
|
244
244
|
unfold/templates/unfold/helpers/submit.html,sha256=6bfZ7V2PTJfSXGg4K3IEZ42oREkMdAVjfP8yaM8Tu0k,226
|
@@ -297,13 +297,13 @@ unfold/templates/unfold_crispy/uni_form.html,sha256=l9UNCUrIycgJ0p_B6qhtO_YxdARy
|
|
297
297
|
unfold/templates/unfold_crispy/whole_uni_form.html,sha256=ufXRKCIGqkqKFOsh166rpKUnHpFMyBV4eYUCRhs3iws,475
|
298
298
|
unfold/templates/unfold_crispy/whole_uni_formset.html,sha256=CYksfG2hRUdi5n691KW2ih-FfBxpOU4qVBfbOvcu1zs,873
|
299
299
|
unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
300
|
-
unfold/templatetags/unfold.py,sha256=
|
300
|
+
unfold/templatetags/unfold.py,sha256=DNwNoNWIcOztQ7X9M50cV5Pg1gvmsP5miAOnE-EM6V0,22985
|
301
301
|
unfold/templatetags/unfold_list.py,sha256=WWQSCM4QmQMr8YddA4krFztuuUXo2y28RA7jZfOiewE,14415
|
302
302
|
unfold/typing.py,sha256=i7LM2LiwYTAjT5-OLDUPVn5b9X-DMmHnjlZG2toWwSE,692
|
303
303
|
unfold/utils.py,sha256=UY7ZvkQ6KXkY0OkThppZ1k1HggyUhV_2bZok-HpFBDA,6827
|
304
|
-
unfold/views.py,sha256=
|
305
|
-
unfold/widgets.py,sha256=
|
306
|
-
django_unfold-0.
|
307
|
-
django_unfold-0.
|
308
|
-
django_unfold-0.
|
309
|
-
django_unfold-0.
|
304
|
+
unfold/views.py,sha256=SA6mtv3aJD861-aL5VNreQUP7GRZH6hK_60MChjm2MM,1641
|
305
|
+
unfold/widgets.py,sha256=FebXqilSMcK9vo5xTJdBuUv4B8L288khpWD5y4Srs08,24749
|
306
|
+
django_unfold-0.65.0.dist-info/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
|
307
|
+
django_unfold-0.65.0.dist-info/METADATA,sha256=Trhzp9AVy_nZwszVAxS6VDDZwNw2m7f9cP_KbL-TvjY,9998
|
308
|
+
django_unfold-0.65.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
309
|
+
django_unfold-0.65.0.dist-info/RECORD,,
|
unfold/admin.py
CHANGED
@@ -63,30 +63,29 @@ class ModelAdmin(BaseModelAdminMixin, ActionModelAdminMixin, BaseModelAdmin):
|
|
63
63
|
warn_unsaved_form = False
|
64
64
|
checks_class = UnfoldModelAdminChecks
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
@property
|
67
|
+
def media(self):
|
68
|
+
if not hasattr(self, "request"):
|
69
|
+
return super().media
|
70
70
|
|
71
|
-
|
71
|
+
media = super().media
|
72
|
+
|
73
|
+
for filter in self.get_list_filter(self.request):
|
72
74
|
if (
|
73
75
|
isinstance(filter, (tuple, list))
|
74
76
|
and hasattr(filter[1], "form_class")
|
75
77
|
and hasattr(filter[1].form_class, "Media")
|
76
78
|
):
|
77
|
-
|
79
|
+
media += forms.Media(filter[1].form_class.Media)
|
78
80
|
elif hasattr(filter, "form_class") and hasattr(filter.form_class, "Media"):
|
79
|
-
|
81
|
+
media += forms.Media(filter.form_class.Media)
|
80
82
|
|
81
|
-
|
82
|
-
extra_context = {}
|
83
|
-
|
84
|
-
extra_context.update(
|
85
|
-
{
|
86
|
-
"media": self.media + additional_media,
|
87
|
-
}
|
88
|
-
)
|
83
|
+
return media
|
89
84
|
|
85
|
+
def changelist_view(
|
86
|
+
self, request: HttpRequest, extra_context: Optional[dict[str, str]] = None
|
87
|
+
) -> TemplateResponse:
|
88
|
+
self.request = request
|
90
89
|
return super().changelist_view(request, extra_context)
|
91
90
|
|
92
91
|
def get_fieldsets(self, request: HttpRequest, obj=None) -> FieldsetsType:
|
@@ -22,30 +22,30 @@
|
|
22
22
|
{{ field }}
|
23
23
|
{% endfor %}
|
24
24
|
|
25
|
-
|
26
|
-
<
|
27
|
-
|
25
|
+
<div class="border border-base-200 rounded-default overflow-x-auto simplebar-horizontal-scrollbar-top dark:border-base-800" data-simplebar data-simplebar-auto-hide="false">
|
26
|
+
<table class="w-full border-collapse">
|
27
|
+
{% if fieldsets %}
|
28
28
|
{% for fieldset in fieldsets %}
|
29
29
|
{% with config_values=fieldset.config_values %}
|
30
30
|
{% include "admin/constance/includes/results_list.html" %}
|
31
31
|
{% endwith %}
|
32
32
|
{% endfor %}
|
33
|
+
{% else %}
|
34
|
+
{% include "admin/constance/includes/results_list.html" %}
|
35
|
+
{% endif %}
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
{% else %}
|
47
|
-
{% include "admin/constance/includes/results_list.html" %}
|
48
|
-
{% endif %}
|
37
|
+
<tfoot>
|
38
|
+
<tr>
|
39
|
+
<td class="border-t border-base-200 px-3 py-2 dark:border-base-800" colspan="100%">
|
40
|
+
<div class="flex justify-end">
|
41
|
+
{% trans "Save" as title %}
|
42
|
+
{% include "unfold/helpers/submit.html" with title=title %}
|
43
|
+
</div>
|
44
|
+
</td>
|
45
|
+
</tr>
|
46
|
+
</tfoot>
|
47
|
+
</table>
|
48
|
+
</div>
|
49
49
|
</form>
|
50
50
|
</div>
|
51
51
|
</div>
|
@@ -1,19 +1,21 @@
|
|
1
1
|
{% load admin_list static i18n %}
|
2
2
|
|
3
3
|
<tbody {% if fieldset.collapse %} x-data="{ rowsOpen: false }" {% endif %}>
|
4
|
-
|
5
|
-
<
|
6
|
-
{
|
4
|
+
{% if fieldset.title %}
|
5
|
+
<tr {% if fieldset.collapse %} x-on:click="rowsOpen = !rowsOpen" {% endif %} class="{% if fieldset.collapse %}cursor-pointer{% endif %}">
|
6
|
+
<th class="bg-base-50 border-t border-base-200 font-semibold px-3 py-2 text-left text-font-important-light dark:text-font-important-dark dark:border-base-800 dark:bg-white/[.04] {% if forloop.first %}border-t-0{% endif %}" colspan="100%">
|
7
|
+
{{ fieldset.title }}
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
{% if fieldset.collapse %}
|
10
|
+
<span class="material-symbols-outlined float-right select-none transition-all" title="{% trans "Collapse" %}" x-bind:class="rowsOpen ? 'rotate-180' : ''">
|
11
|
+
expand_more
|
12
|
+
</span>
|
13
|
+
{% endif %}
|
14
|
+
</th>
|
15
|
+
</tr>
|
16
|
+
{% endif %}
|
15
17
|
|
16
|
-
<tr class="border-t border-base-200 dark:border-base-800 *:font-semibold *:px-3 *:py-2 *:text-left *:text-font-important-light dark:*:text-font-important-dark" {% if fieldset.collapse %}x-show="rowsOpen"{% endif %}>
|
18
|
+
<tr class="{% if fieldset.title %}border-t{% endif %} border-base-200 dark:border-base-800 *:font-semibold *:px-3 *:py-2 *:text-left *:text-font-important-light dark:*:text-font-important-dark" {% if fieldset.collapse %}x-show="rowsOpen"{% endif %}>
|
17
19
|
<th>{% trans "Name" %}</th>
|
18
20
|
<th>{% trans "Value" %}</th>
|
19
21
|
<th>{% trans "Default" %}</th>
|
unfold/dataclasses.py
CHANGED
@@ -18,7 +18,7 @@ from unfold.overrides import FORMFIELD_OVERRIDES
|
|
18
18
|
|
19
19
|
|
20
20
|
class BaseModelAdminMixin:
|
21
|
-
def __init__(self, model: models.Model, admin_site: AdminSite) -> None:
|
21
|
+
def __init__(self, model: type[models.Model], admin_site: AdminSite) -> None:
|
22
22
|
overrides = copy.deepcopy(FORMFIELD_OVERRIDES)
|
23
23
|
|
24
24
|
for k, v in self.formfield_overrides.items():
|
unfold/sites.py
CHANGED
@@ -356,11 +356,7 @@ class UnfoldAdminSite(AdminSite):
|
|
356
356
|
)
|
357
357
|
|
358
358
|
# Checks if any tab item is active and then marks the sidebar link as active
|
359
|
-
if (
|
360
|
-
tabs
|
361
|
-
and self._get_is_tab_active(request, tabs, link)
|
362
|
-
and "active" not in item
|
363
|
-
):
|
359
|
+
if tabs and self._get_is_tab_active(request, tabs, link):
|
364
360
|
item["active"] = True
|
365
361
|
|
366
362
|
# Link callback
|
@@ -582,6 +578,7 @@ class UnfoldAdminSite(AdminSite):
|
|
582
578
|
title=item.get("title"),
|
583
579
|
link=self._get_value(item["link"], *args),
|
584
580
|
icon=item.get("icon"),
|
581
|
+
attrs=item.get("attrs"),
|
585
582
|
)
|
586
583
|
for item in items
|
587
584
|
]
|