django-unfold 0.64.2__py3-none-any.whl → 0.66.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.
Files changed (34) hide show
  1. {django_unfold-0.64.2.dist-info → django_unfold-0.66.0.dist-info}/METADATA +4 -2
  2. {django_unfold-0.64.2.dist-info → django_unfold-0.66.0.dist-info}/RECORD +34 -33
  3. {django_unfold-0.64.2.dist-info → django_unfold-0.66.0.dist-info}/WHEEL +1 -1
  4. unfold/admin.py +15 -16
  5. unfold/contrib/constance/settings.py +1 -0
  6. unfold/contrib/constance/templates/admin/constance/change_list.html +18 -18
  7. unfold/contrib/constance/templates/admin/constance/includes/results_list.html +13 -11
  8. unfold/contrib/location_field/templates/location_field/map_widget.html +1 -1
  9. unfold/dataclasses.py +1 -0
  10. unfold/mixins/base_model_admin.py +1 -1
  11. unfold/sites.py +45 -18
  12. unfold/static/unfold/css/styles.css +1 -1
  13. unfold/static/unfold/js/app.js +56 -11
  14. unfold/styles.css +24 -10
  15. unfold/templates/admin/change_form.html +6 -2
  16. unfold/templates/admin/nav_sidebar.html +1 -1
  17. unfold/templates/unfold/components/button.html +1 -1
  18. unfold/templates/unfold/components/card.html +3 -3
  19. unfold/templates/unfold/components/layer.html +1 -0
  20. unfold/templates/unfold/components/progress.html +8 -8
  21. unfold/templates/unfold/components/tracker.html +1 -1
  22. unfold/templates/unfold/helpers/app_list.html +1 -1
  23. unfold/templates/unfold/helpers/boolean.html +1 -1
  24. unfold/templates/unfold/helpers/command.html +1 -1
  25. unfold/templates/unfold/helpers/command_results.html +31 -12
  26. unfold/templates/unfold/helpers/header_back_button.html +1 -1
  27. unfold/templates/unfold/helpers/pagination_infinite.html +1 -1
  28. unfold/templates/unfold/helpers/search.html +1 -0
  29. unfold/templates/unfold/helpers/site_dropdown.html +1 -1
  30. unfold/templates/unfold/widgets/clearable_file_input_small.html +1 -1
  31. unfold/templatetags/unfold.py +72 -22
  32. unfold/views.py +2 -0
  33. unfold/widgets.py +5 -3
  34. {django_unfold-0.64.2.dist-info → django_unfold-0.66.0.dist-info/licenses}/LICENSE.md +0 -0
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: django-unfold
3
- Version: 0.64.2
3
+ Version: 0.66.0
4
4
  Summary: Modern Django admin theme for seamless interface development
5
5
  License: MIT
6
+ License-File: LICENSE.md
6
7
  Keywords: django,admin,tailwind,theme
7
8
  Requires-Python: >=3.9
8
9
  Classifier: Environment :: Web Environment
@@ -17,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
17
18
  Classifier: Programming Language :: Python :: 3.11
18
19
  Classifier: Programming Language :: Python :: 3.12
19
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
20
22
  Requires-Dist: django (>=4.2)
21
23
  Project-URL: Homepage, https://unfoldadmin.com
22
24
  Project-URL: Repository, https://github.com/unfoldadmin/django-unfold
@@ -1,14 +1,14 @@
1
1
  unfold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- unfold/admin.py,sha256=KJdeGky2GPW-haq9B81c_UdbZt05Ievky9tt2z6apsA,7454
2
+ unfold/admin.py,sha256=UeAG6y53kX5P7esCzCcqNztQ9WCujtscrjCyULeapvQ,7422
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
6
6
  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
- unfold/contrib/constance/settings.py,sha256=SuEMNoEHjCiC3TrdQirKP6Uw17nuTaReKOTGiFjgAR4,785
10
- unfold/contrib/constance/templates/admin/constance/change_list.html,sha256=F1vjLZ4WBnpJY_teCioCbr9EuBmXEuYZsGxsARqFT0U,2366
11
- unfold/contrib/constance/templates/admin/constance/includes/results_list.html,sha256=icFkvds6H96GeeJZFTmWw74Ze4TwBX9GGUPltkg16qA,3663
9
+ unfold/contrib/constance/settings.py,sha256=Jm5bFB8t02mKPDS67VZJuw0a6QpMBtfNwTZeofhudkc,816
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
@@ -79,14 +79,14 @@ unfold/contrib/inlines/checks.py,sha256=0vkHUh-MtNSTrcOjCLbZmtI4961fFOygOv_dBAps
79
79
  unfold/contrib/inlines/forms.py,sha256=noZdrBgvsu9tCBbRW3f9p7o6xKSuXtWR14qbZPdZBPA,1395
80
80
  unfold/contrib/location_field/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  unfold/contrib/location_field/apps.py,sha256=qbNLfWXWf9q_gZxnuwFNVj20liSk_OT29uWMAi1she8,150
82
- unfold/contrib/location_field/templates/location_field/map_widget.html,sha256=HXNqZ7TRh8zxq7jxGv5V5De7jdB_L6smXSWX_KXujJs,179
82
+ unfold/contrib/location_field/templates/location_field/map_widget.html,sha256=vIBWNxIiCZipMnnPkZBFEZa-F3qXTKz9t4DbMmiBSSM,184
83
83
  unfold/contrib/simple_history/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
84
  unfold/contrib/simple_history/apps.py,sha256=eF_KVYb60CAnGgWk2Z1YKYGfgA3TJBMr229qI7e2pgU,153
85
85
  unfold/contrib/simple_history/templates/simple_history/object_history.html,sha256=unZQE70be7cK6v0YPlITFeaosmiLt3kiei-pmmCjBg0,1711
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=pvzhMrJIC80zbTnH075PmFeJEEnSjzgvaxQGTfCEpYg,826
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=PyTZSxF6tIcs20VlMCX08tFnB0ORU0VXvgcPArkiE68,4796
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=CgHmH9ozko-_WSW54gmZ3HBDbmekKVyVOmefFO10adY,20320
103
+ unfold/sites.py,sha256=NIO2vjCmSabI4aWZmpEbjgiSv4m3q0qKPoQjaAdxwIA,21380
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=PqqGUjW6Dj1k2Nd4R0yoS7hCD5BUgmmUZxDifB4pCEI,159736
108
+ unfold/static/unfold/css/styles.css,sha256=MZEBfoBM6rUi0pkIoQw0hi2lChPsdCFIchyBOm4oF8c,211708
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
@@ -121,7 +121,7 @@ unfold/static/unfold/js/alpine/alpine.js,sha256=PtHu0lJIiSHfZeNj1nFd6wTX-Squ255S
121
121
  unfold/static/unfold/js/alpine/alpine.persist.js,sha256=jFBwr6faTqqhp3sVi4_VTxJ0FpaF9YGZN1ZGLl_5QYM,837
122
122
  unfold/static/unfold/js/alpine/alpine.resize.js,sha256=mXR2L6neT584cfNLY5_imDq5DKjW1noXys7fhb1yxY4,703
123
123
  unfold/static/unfold/js/alpine/alpine.sort.js,sha256=q6LxgConwu8M8R03mZSBcsKwJv6fF7oomP8sqLxVQ0w,37891
124
- unfold/static/unfold/js/app.js,sha256=F7xblFopfjmdEAttR0ShM8yzE2g_mGWt1mPuh8e-Cj4,13454
124
+ unfold/static/unfold/js/app.js,sha256=rz5y-wOzUpXN1Gk23bot3XMyB6P3rTSSz6kqdDtuyMU,14775
125
125
  unfold/static/unfold/js/chart/LICENSE,sha256=QahKosq6ZF-WahjZwgVrc-bTqB2AvABGvAARomNNTM4,1093
126
126
  unfold/static/unfold/js/chart/chart.js,sha256=22W6cFERR-CElMOKRgMMicueMVP0Vf7FBEBYH8Z8tCk,200633
127
127
  unfold/static/unfold/js/htmx/LICENSE,sha256=09JFb3ZBTyRWEEZg69Za_xwEzXlmuUK9q9Y_PNsxajg,642
@@ -129,7 +129,7 @@ unfold/static/unfold/js/htmx/htmx.js,sha256=acrv0NqSJpBm5yXX_hdeJrnVDJYuMFZFnAxH
129
129
  unfold/static/unfold/js/select2.init.js,sha256=E1BhZ_a16_wxMb3zFq346HIrzvfQz8PRSB_o5CH_i2E,1196
130
130
  unfold/static/unfold/js/simplebar/LICENSE,sha256=okNJf6UFl2NrEiC4iqORNBa16IKgUgV88acdcl9FbtY,1081
131
131
  unfold/static/unfold/js/simplebar/simplebar.js,sha256=t-uG1FAD6ZoiMeN--wac0XRS7SxoDVG6zvRnGuEp7X8,27176
132
- unfold/styles.css,sha256=c62G1eNFzth-br50OZIl8vBMOWK_6myffjHt1JFj08I,21231
132
+ unfold/styles.css,sha256=hNU0840jnbJB20nLuE12sbKX3jCqjWR76mmsLN9uZic,21739
133
133
  unfold/templates/admin/actions.html,sha256=iuuubcAILkOoYBgV6cpXqFIyZUh4zMqyFp0JaDFlPKU,3096
134
134
  unfold/templates/admin/app_index.html,sha256=hcXcaEwqKYTaClnGzlBEsTzy3YJn_37AiFs4YVbvX8A,585
135
135
  unfold/templates/admin/app_list.html,sha256=-DEZKFdmkdTq3rix_cgZurPZ1r8PHg5pBL3i7ZtzVdI,2972
@@ -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=zjcJ-aB4hES_3-YJdRXhp7GWzuOk_yQ7UoyYBu-5sno,4491
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
@@ -152,7 +152,7 @@ unfold/templates/admin/includes/fieldset.html,sha256=UWcatsmHzfdcjZP58P94YL7BI3F
152
152
  unfold/templates/admin/includes/object_delete_summary.html,sha256=FgwfapZCKWtnFtTHqh1MRuxxLot4bAw92WCcR_V8ImI,444
153
153
  unfold/templates/admin/index.html,sha256=n9uEm32hjM3g5d2hkjRlgwcYcAcmVw6nBVS__h8BIRU,539
154
154
  unfold/templates/admin/login.html,sha256=E963dlzjZlkNc6WPJg9DiqijWAhRp1QLVCxFHkRca3g,2468
155
- unfold/templates/admin/nav_sidebar.html,sha256=xvCaXOamXawmf80NhE0OwjjjuNwoyoePS--lsdqDeIE,772
155
+ unfold/templates/admin/nav_sidebar.html,sha256=NiNcLF-0eZwwv2arsikChzwbH7FTI1vEch427KddFlk,772
156
156
  unfold/templates/admin/object_history.html,sha256=4S9xpBtywUdFPUmvAuH2lMOG6jxCFZ-rFZYnhbajkRw,3726
157
157
  unfold/templates/admin/pagination.html,sha256=-9kjc_lKEeqvDVHMrnTfnlXDxMSkM8GNRGZGuI9D8os,912
158
158
  unfold/templates/admin/search_form.html,sha256=7ckco8llu5paptroZgr3jZw54DtowX-NiwFvxsCV898,1713
@@ -161,35 +161,36 @@ unfold/templates/auth/widgets/read_only_password_hash.html,sha256=MlaNXJ2PLEbv8N
161
161
  unfold/templates/registration/logged_out.html,sha256=ytjIz3abnpERwUp1F8zn89HyrimSrb9wgUna3Iz0CJE,1202
162
162
  unfold/templates/registration/password_change_done.html,sha256=TjzRQ476BNkz3To2S7MhEXxA-zoqCI8Op_FjY0cRod0,364
163
163
  unfold/templates/registration/password_change_form.html,sha256=E9fRkSh7n5N7UQIy0oWpcvI1mVPQ0nYGlBrM_WTi9kw,1517
164
- unfold/templates/unfold/components/button.html,sha256=RlNNIa_JmcsNFH151ECHkbB2TxpgeCPRh-eW1Bc0Xtk,933
165
- unfold/templates/unfold/components/card.html,sha256=fwko37u8KJIDQwiD2v8RoVuvZu8qBPyPl2TambOcFnc,1349
164
+ unfold/templates/unfold/components/button.html,sha256=oJEamHBxDIjoQ1xqWuJWDMY5ItUo8jpkZrqFp_cCH5U,933
165
+ unfold/templates/unfold/components/card.html,sha256=ntmFJcHWDQ1M6Xp9mE9BpIBeOfV-huSayDqz1Ajnd0k,1410
166
166
  unfold/templates/unfold/components/chart/bar.html,sha256=nDdDCUXvFd793OpNgNPQo0vBmvYngMsQyPHVTf1vfOw,297
167
167
  unfold/templates/unfold/components/chart/cohort.html,sha256=L00WR-igYv0C3t2yT_nZqeI-M5gVHpoaGv5RooRojqU,2402
168
168
  unfold/templates/unfold/components/chart/line.html,sha256=DHaZUFTlCs5cX7ioYdTzoN4ITHWNcEoNSUp7v3hlo_E,298
169
169
  unfold/templates/unfold/components/container.html,sha256=WBk1rGHnTsObi3pJCpL3dfFAUQ2abDmokU0Lee7R9CI,83
170
170
  unfold/templates/unfold/components/flex.html,sha256=_hBsQLJ6-7MfEfXNp5Wy-ykNtPMnnNg_io2IMGegn3s,134
171
171
  unfold/templates/unfold/components/icon.html,sha256=Qlhcf41FOwNVJ-nvA0RJ_Dn6JW6PUFXO6tOR3Xtf6e8,99
172
+ unfold/templates/unfold/components/layer.html,sha256=c2EY2rr64rJ5BPj97UdFAJTNWAommGoYL9J8gmjzEPE,15
172
173
  unfold/templates/unfold/components/navigation.html,sha256=0imW9pQs9kUZy2iROeAsGJDXC5tMRq9ABRcN85fJPeQ,866
173
- unfold/templates/unfold/components/progress.html,sha256=5D9z7PDo68jI_33e-MVPM0V3tywswn5fWc_x39XKQ_4,972
174
+ unfold/templates/unfold/components/progress.html,sha256=W55ByXiM-Ig_3fcpsZAG8N3HjQAl60sl7XsLsIZABrA,1001
174
175
  unfold/templates/unfold/components/separator.html,sha256=yvHywT_MFkx5dNC2K53OFHRGxLDsEjRpptujXyGeoTY,168
175
176
  unfold/templates/unfold/components/table.html,sha256=5Ghmaw3mHhKOlBKKRBfhmSx0-HkRx1sHpX6NDItgdv4,7911
176
177
  unfold/templates/unfold/components/text.html,sha256=-GjxvdiaBQIaNfPSzT6SSIwnc3R27FkSDQMoF3FDPso,102
177
178
  unfold/templates/unfold/components/title.html,sha256=aMYSO30ybFYqPnqwlJVh2uNmcgnVrRycZkHTjJTjpX8,171
178
- unfold/templates/unfold/components/tracker.html,sha256=krlvsb06lpfdOIANsyrBOoLq1sgv6rXUGr-7MmP5Le0,292
179
+ unfold/templates/unfold/components/tracker.html,sha256=V3gOYUrjZPFpwMPGGrocgXTpE-PxqDhIlpomvdWO42g,329
179
180
  unfold/templates/unfold/helpers/account_links.html,sha256=Tq30bAkOU8QRR6CaB1CvTfTgkoPP5dz2v0OHYq0pRSE,2348
180
181
  unfold/templates/unfold/helpers/actions_row.html,sha256=RqhZsxgIFR-r1casv5CueL81uxNl8rA3XuCMDP--zLA,2586
181
182
  unfold/templates/unfold/helpers/add_link.html,sha256=vd-oy-xMIDiVmFVvwDL3-S360hOOmyAdfqcOTdDU1hI,870
182
- unfold/templates/unfold/helpers/app_list.html,sha256=baydU9R_xmH9pWgs8B7PUcwTWcLxHDhD1ehs75c5PD0,5879
183
+ unfold/templates/unfold/helpers/app_list.html,sha256=r1umyGnHwEamkdPCX3NJIs9xXKAw25gcq3n9JB4wL1M,5894
183
184
  unfold/templates/unfold/helpers/app_list_default.html,sha256=0TR2ZTy0KUqa6YR8IgihA_4RQqBIFOroYpRHHIyD4H8,4015
184
185
  unfold/templates/unfold/helpers/attrs.html,sha256=Mwpj72kuwYj8hOT3J2T8qx6f1r_4xwwaS1slHA-82jI,166
185
- unfold/templates/unfold/helpers/boolean.html,sha256=GyLsuvfp7SJSvwdN_wkruuL6yf3Rpb6zWl_WycTC8a8,811
186
+ unfold/templates/unfold/helpers/boolean.html,sha256=zK8xL-fv1rktvUQSYL6O-yGGjpr3w5TDBb3uyw1bF3o,812
186
187
  unfold/templates/unfold/helpers/breadcrumb_item.html,sha256=9T6ojN7LOXIlgwSwlIwHgy5U22eQYtarCqcmzsQIoPU,201
187
188
  unfold/templates/unfold/helpers/change_list_actions.html,sha256=xuFMZel6kH014H9sl0hKvQo7LP0UxwlhFQHIUeyQxVM,643
188
189
  unfold/templates/unfold/helpers/change_list_filter.html,sha256=WwU-AG4U5qZQ_sFs1z_jaaYBWqIv3ASmtKIQIhAp2gs,1908
189
190
  unfold/templates/unfold/helpers/change_list_filter_actions.html,sha256=K99hHgpCLaAHxv-eqIf4nOUfq6CeTQHekEeudKTRYME,2036
190
- unfold/templates/unfold/helpers/command.html,sha256=s5W_RZWz8kACMQzgf91sB3xFJES3OsQG5MoTPbj16f8,2826
191
+ unfold/templates/unfold/helpers/command.html,sha256=VDy7b6mlDL9kpt2VrCuUQwzjwUOPztUL3hrU2kp0tVs,2885
191
192
  unfold/templates/unfold/helpers/command_history.html,sha256=AB5elGPyY51aHuaWnwXddZmdcSadcqBOzdzjYqR4lfU,2866
192
- unfold/templates/unfold/helpers/command_results.html,sha256=nmdU8QEF68tYIOgt5pPmNPq4pQ_fCtNIOSPeunsadvs,2708
193
+ unfold/templates/unfold/helpers/command_results.html,sha256=3sYaBePPt9o_WDS9UeZojW-QZzbOGd474r2Elfn_33Q,3679
193
194
  unfold/templates/unfold/helpers/delete_submit_line.html,sha256=7SNS0axGytvUih9KxtOzy9ZC5rwG9u99iQxlnUZQfdE,700
194
195
  unfold/templates/unfold/helpers/display_dropdown.html,sha256=IpOy8-hww4arAVjPIRsHrip30J3IEd2p-2BzD3BjIaA,2906
195
196
  unfold/templates/unfold/helpers/display_header.html,sha256=2u-5Vc3mA6rS3ZlOWm3WRNLUX1wmZy4OSmGY2mdPZYs,1714
@@ -211,7 +212,7 @@ unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=F-s-4imtLbp2IYad3lFcD
211
212
  unfold/templates/unfold/helpers/form_errors.html,sha256=mrv2_J7RPcLfVtoN1UHh3rfUyOSZpHl67wk1UGqtPcY,266
212
213
  unfold/templates/unfold/helpers/form_label.html,sha256=7FfaXfviQmqKpsA1E7NSwM8rJiMNLl9e73XQram0Pfs,249
213
214
  unfold/templates/unfold/helpers/header.html,sha256=cHAPz7niLLQDQbrZpURZS1hiA8OYLzkGaqnYzjgv8aE,1151
214
- unfold/templates/unfold/helpers/header_back_button.html,sha256=FsgC8ULfm7U3a9-uxY_ebdgKFh-Pecc-9_hgenkHKdU,734
215
+ unfold/templates/unfold/helpers/header_back_button.html,sha256=axtIbVUtRZ5gDXL7q-TdzCLbzen3kWyOernQDXoHb-g,730
215
216
  unfold/templates/unfold/helpers/header_title.html,sha256=-H3x6au-ZmMV1Y-HDeOs66MsL0XGKwQxYRnmDGuR268,510
216
217
  unfold/templates/unfold/helpers/help_text.html,sha256=fDsSptYt6aPO3xPdMgbpwaINaF1FGFmaOb_1FiS_Bsg,118
217
218
  unfold/templates/unfold/helpers/history.html,sha256=qxfCZxFIyl91qDpxfwozhmyVFZwULysA8Y_2H8XJ7bM,1937
@@ -231,14 +232,14 @@ unfold/templates/unfold/helpers/pagination.html,sha256=cvD4Jtw1YeKcgvWuY10iyM9Qj
231
232
  unfold/templates/unfold/helpers/pagination_current_item.html,sha256=4cZ2KLVcP0Y7xuGyXgexDQ07r94cgM5Gnmtv11dkRPQ,69
232
233
  unfold/templates/unfold/helpers/pagination_default.html,sha256=pseTrqaG5EOn_IpCy0GXNht3ickSkZYJ4lJaocZeI6A,496
233
234
  unfold/templates/unfold/helpers/pagination_ellipsis.html,sha256=8g0KUUKtqRkXx_EBLGtsJsiYQO4tPS3GazZjxT90e0M,56
234
- unfold/templates/unfold/helpers/pagination_infinite.html,sha256=QyHcYb36CeuiwpukC0Y553UC4LU2tPolGos-0mh7WP0,557
235
+ unfold/templates/unfold/helpers/pagination_infinite.html,sha256=OPX_UliZvyN2hoCI2EYTFMSTZDVitTJdlSFZyv55i7U,633
235
236
  unfold/templates/unfold/helpers/pagination_inline.html,sha256=mMiqoYTmLjN2DFoen46EWHyP-b61staMG6WiaZn-YxI,1889
236
237
  unfold/templates/unfold/helpers/popup_header.html,sha256=IDR9B0OO6v6TvJggeof-OMGJ4cYK2INStU_2a1AlWfM,1325
237
- unfold/templates/unfold/helpers/search.html,sha256=Fpft3UmIH2EVI3_Jt66-ot42eTGj90cU5kns8XNHe5k,3070
238
+ unfold/templates/unfold/helpers/search.html,sha256=kZlsJxgdFK3otMv4TZCksNKT_dkq5DJc2g9oicKeKPs,3134
238
239
  unfold/templates/unfold/helpers/search_results.html,sha256=9FXx8fiByx0K2o8x2y8n0Wv-9kRUWk0y2PYu9raK1es,833
239
240
  unfold/templates/unfold/helpers/shortcut.html,sha256=K71_vp9qvY5gSsTgDP-9rivneSKAP5uWbfUnIpiwMBM,217
240
241
  unfold/templates/unfold/helpers/site_branding.html,sha256=_hhWQZqUrMYGqRJRpeANjbRJPfCROPZkQLZLV7FiRk8,268
241
- unfold/templates/unfold/helpers/site_dropdown.html,sha256=vQC7UZDVxIWJMGBD5qHLMGA9Cza3DTMDY2Z9n9EV60M,985
242
+ unfold/templates/unfold/helpers/site_dropdown.html,sha256=grU49elBhFKokJ1uDfzHLlwP1rzLnyDFOw1mw1CKpos,1049
242
243
  unfold/templates/unfold/helpers/site_icon.html,sha256=q9YynbaAZsEXKXT3SDZy54iSdjUwR6i2vo0AFyllGQ0,1490
243
244
  unfold/templates/unfold/helpers/site_logo.html,sha256=S_QJoT2qh0xw0ciaKxoT4GJ6QIH5eqgRSC0abbWWkOI,423
244
245
  unfold/templates/unfold/helpers/submit.html,sha256=6bfZ7V2PTJfSXGg4K3IEZ42oREkMdAVjfP8yaM8Tu0k,226
@@ -257,7 +258,7 @@ unfold/templates/unfold/layouts/skeleton.html,sha256=hkCClXksW5IQVN95WPfmOa6h6iA
257
258
  unfold/templates/unfold/layouts/unauthenticated.html,sha256=b1yVJZThOw30SF580BTKzj5TJsIsR3lGBJ5jqtFsXuM,983
258
259
  unfold/templates/unfold/templatetags/preserve_changelist_filters.html,sha256=sx2jUhogNY4emBhY8PqxQ6mXifbXQb_IQI9Hd0boJI0,111
259
260
  unfold/templates/unfold/widgets/clearable_file_input.html,sha256=8dXZnc6z2D2K08hqHsQwR5UJffcIRnmYBT02zmCOr9A,2191
260
- unfold/templates/unfold/widgets/clearable_file_input_small.html,sha256=zhnaDz72mJgMrq-nCPCMuR5tEJaFVfJyOJUAzR6tQWc,2624
261
+ unfold/templates/unfold/widgets/clearable_file_input_small.html,sha256=SngF5SUR2Mk-eQSf0D30Stf-M2gFTY3PQK_EI27icvI,2624
261
262
  unfold/templates/unfold/widgets/date.html,sha256=ih9wj8koTaHb9s1NGUmyN9rHvSAmqCMbti9ONDOIujg,122
262
263
  unfold/templates/unfold/widgets/foreign_key_raw_id.html,sha256=4r7ha4I9vMp9Ls7WIbWxF1xuLGLWli7gIZoZAH3Bcyg,1114
263
264
  unfold/templates/unfold/widgets/radio.html,sha256=7Mgc92mMwJdVLjCxoGj5lo76KNaN5dKKktV3vzmbeqA,652
@@ -297,13 +298,13 @@ unfold/templates/unfold_crispy/uni_form.html,sha256=l9UNCUrIycgJ0p_B6qhtO_YxdARy
297
298
  unfold/templates/unfold_crispy/whole_uni_form.html,sha256=ufXRKCIGqkqKFOsh166rpKUnHpFMyBV4eYUCRhs3iws,475
298
299
  unfold/templates/unfold_crispy/whole_uni_formset.html,sha256=CYksfG2hRUdi5n691KW2ih-FfBxpOU4qVBfbOvcu1zs,873
299
300
  unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
300
- unfold/templatetags/unfold.py,sha256=_OtD5JmyPA4G28fZRFEkfBQMUq8giNumjqFP8AhvCjI,22550
301
+ unfold/templatetags/unfold.py,sha256=zzIQyP1O8j1KfzYbCT0TW3gJROj3dZJOq5Y6MbwUe8I,24376
301
302
  unfold/templatetags/unfold_list.py,sha256=WWQSCM4QmQMr8YddA4krFztuuUXo2y28RA7jZfOiewE,14415
302
303
  unfold/typing.py,sha256=i7LM2LiwYTAjT5-OLDUPVn5b9X-DMmHnjlZG2toWwSE,692
303
304
  unfold/utils.py,sha256=UY7ZvkQ6KXkY0OkThppZ1k1HggyUhV_2bZok-HpFBDA,6827
304
- unfold/views.py,sha256=iICsveQVxeXSKKr8MfJbq82nOpLLNlGYoJox7SEHFcA,1572
305
- unfold/widgets.py,sha256=Af4eZWRxhOxxDpyxz-jC5DD_JNvZ0NSvJirVJOQcA_8,24687
306
- django_unfold-0.64.2.dist-info/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
307
- django_unfold-0.64.2.dist-info/METADATA,sha256=TDy4Nw2fY2KUG8-PJav7GQ6rmmRCrJNQlxApnVcxnyI,9998
308
- django_unfold-0.64.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
309
- django_unfold-0.64.2.dist-info/RECORD,,
305
+ unfold/views.py,sha256=SA6mtv3aJD861-aL5VNreQUP7GRZH6hK_60MChjm2MM,1641
306
+ unfold/widgets.py,sha256=nu2oqcKhs3lhj9ueYfs3BqDzZT5raAE6jeAEgU4WrHE,24751
307
+ django_unfold-0.66.0.dist-info/METADATA,sha256=03YKKQ-HAzpxOxPlLKN9ps2rYqatp9HZf_cJpjjVXM0,10074
308
+ django_unfold-0.66.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
309
+ django_unfold-0.66.0.dist-info/licenses/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
310
+ django_unfold-0.66.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
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
- def changelist_view(
67
- self, request: HttpRequest, extra_context: Optional[dict[str, str]] = None
68
- ) -> TemplateResponse:
69
- additional_media = forms.Media()
66
+ @property
67
+ def media(self):
68
+ if not hasattr(self, "request"):
69
+ return super().media
70
70
 
71
- for filter in self.get_list_filter(request):
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
- additional_media += forms.Media(filter[1].form_class.Media)
79
+ media += forms.Media(filter[1].form_class.Media)
78
80
  elif hasattr(filter, "form_class") and hasattr(filter.form_class, "Media"):
79
- additional_media += forms.Media(filter.form_class.Media)
81
+ media += forms.Media(filter.form_class.Media)
80
82
 
81
- if not extra_context:
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:
@@ -193,7 +192,7 @@ class ModelAdmin(BaseModelAdminMixin, ActionModelAdminMixin, BaseModelAdmin):
193
192
  ) -> dict[str, Any]:
194
193
  formset_kwargs = super().get_formset_kwargs(request, obj, inline, prefix)
195
194
 
196
- if hasattr(inline, "per_page"):
195
+ if hasattr(inline, "per_page") and inline.per_page:
197
196
  formset_kwargs["request"] = request
198
197
  formset_kwargs["per_page"] = inline.per_page
199
198
 
@@ -15,6 +15,7 @@ UNFOLD_CONSTANCE_ADDITIONAL_FIELDS = {
15
15
  "django.forms.BooleanField",
16
16
  {
17
17
  "widget": "unfold.widgets.UnfoldBooleanSwitchWidget",
18
+ "required": False,
18
19
  },
19
20
  ],
20
21
  "file_field": [
@@ -22,30 +22,30 @@
22
22
  {{ field }}
23
23
  {% endfor %}
24
24
 
25
- {% if fieldsets %}
26
- <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">
27
- <table class="w-full border-collapse">
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
- <tfoot>
35
- <tr>
36
- <td class="border-t border-base-200 px-3 py-2 dark:border-base-800" colspan="100%">
37
- <div class="flex justify-end">
38
- {% trans "Save" as title %}
39
- {% include "unfold/helpers/submit.html" with title=title %}
40
- </div>
41
- </td>
42
- </tr>
43
- </tfoot>
44
- </table>
45
- </div>
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
- <tr {% if fieldset.collapse %} x-on:click="rowsOpen = !rowsOpen" {% endif %} class="{% if fieldset.collapse %}cursor-pointer{% endif %}">
5
- <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%">
6
- {{ fieldset.title }}
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
- {% if fieldset.collapse %}
9
- <span class="material-symbols-outlined float-right select-none transition-all" title="{% trans "Collapse" %}" x-bind:class="rowsOpen ? 'rotate-180' : ''">
10
- expand_more
11
- </span>
12
- {% endif %}
13
- </th>
14
- </tr>
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>
@@ -1,5 +1,5 @@
1
1
  <div class="map-widget flex flex-col gap-2">
2
2
  {{ field_input }}
3
3
 
4
- <div id="map_{{ field_name }}" class="border gap-2 h-72 max-w-2xl rounded-default shadow-xs"></div>
4
+ <div id="map_{{ field_name }}" class="border gap-2 h-72 max-w-2xl rounded-default shadow-xs z-10"></div>
5
5
  </div>
unfold/dataclasses.py CHANGED
@@ -39,3 +39,4 @@ class DropdownItem:
39
39
  title: str
40
40
  link: Union[str, Callable]
41
41
  icon: Optional[str] = None
42
+ attrs: Optional[dict] = None
@@ -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
@@ -6,6 +6,7 @@ from urllib.parse import parse_qs, urlparse
6
6
 
7
7
  from django.contrib.admin import AdminSite
8
8
  from django.core.cache import cache
9
+ from django.core.paginator import Paginator
9
10
  from django.core.validators import EMPTY_VALUES
10
11
  from django.http import HttpRequest, HttpResponse
11
12
  from django.template.response import TemplateResponse
@@ -209,12 +210,23 @@ class UnfoldAdminSite(AdminSite):
209
210
  return results
210
211
 
211
212
  def _search_models(
212
- self, request: HttpRequest, app_list: list[dict[str, Any]], search_term: str
213
+ self,
214
+ request: HttpRequest,
215
+ app_list: list[dict[str, Any]],
216
+ search_term: str,
217
+ allowed_models: Optional[list[str]] = None,
213
218
  ) -> list[SearchResult]:
214
219
  results = []
215
220
 
216
221
  for app in app_list:
217
222
  for model in app["models"]:
223
+ # Skip models which are not allowed
224
+ if isinstance(allowed_models, (list, tuple)):
225
+ if model["model"]._meta.label.lower() not in [
226
+ m.lower() for m in allowed_models
227
+ ]:
228
+ continue
229
+
218
230
  admin_instance = self._registry.get(model["model"])
219
231
  search_fields = admin_instance.get_search_fields(request)
220
232
 
@@ -255,7 +267,8 @@ class UnfoldAdminSite(AdminSite):
255
267
  ) -> TemplateResponse:
256
268
  start_time = time.time()
257
269
 
258
- CACHE_TIMEOUT = 10
270
+ CACHE_TIMEOUT = 5 * 60
271
+ PER_PAGE = 100
259
272
 
260
273
  search_term = request.GET.get("s")
261
274
  extended_search = "extended" in request.GET
@@ -276,33 +289,50 @@ class UnfoldAdminSite(AdminSite):
276
289
  results = cache_results
277
290
  else:
278
291
  results = self._search_apps(app_list, search_term)
279
- search_models = self._get_config("COMMAND", request).get("search_models")
280
- search_callback = self._get_config("COMMAND", request).get(
281
- "search_callback"
282
- )
283
292
 
284
293
  if extended_search:
285
- if search_callback:
294
+ if search_callback := self._get_config("COMMAND", request).get(
295
+ "search_callback"
296
+ ):
286
297
  results.extend(
287
298
  self._get_value(search_callback, request, search_term)
288
299
  )
289
300
 
290
- if search_models is True:
291
- results.extend(self._search_models(request, app_list, search_term))
301
+ search_models = self._get_value(
302
+ self._get_config("COMMAND", request).get("search_models"), request
303
+ )
304
+
305
+ if search_models is True or isinstance(search_models, (list, tuple)):
306
+ allowed_models = (
307
+ search_models
308
+ if isinstance(search_models, (list, tuple))
309
+ else None
310
+ )
311
+
312
+ results.extend(
313
+ self._search_models(
314
+ request, app_list, search_term, allowed_models
315
+ )
316
+ )
292
317
 
293
318
  cache.set(cache_key, results, timeout=CACHE_TIMEOUT)
294
319
 
295
320
  execution_time = time.time() - start_time
321
+ paginator = Paginator(results, PER_PAGE)
322
+
323
+ show_history = self._get_value(
324
+ self._get_config("COMMAND", request).get("show_history"), request
325
+ )
296
326
 
297
327
  return TemplateResponse(
298
328
  request,
299
329
  template=template_name,
300
330
  context={
301
- "results": results,
331
+ "page_obj": paginator,
332
+ "results": paginator.page(request.GET.get("page", 1)),
333
+ "page_counter": (int(request.GET.get("page", 1)) - 1) * PER_PAGE,
302
334
  "execution_time": execution_time,
303
- "command_show_history": self._get_config("COMMAND", request).get(
304
- "show_history"
305
- ),
335
+ "command_show_history": show_history,
306
336
  },
307
337
  headers={
308
338
  "HX-Trigger": "search",
@@ -356,11 +386,7 @@ class UnfoldAdminSite(AdminSite):
356
386
  )
357
387
 
358
388
  # 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
- ):
389
+ if tabs and self._get_is_tab_active(request, tabs, link):
364
390
  item["active"] = True
365
391
 
366
392
  # Link callback
@@ -582,6 +608,7 @@ class UnfoldAdminSite(AdminSite):
582
608
  title=item.get("title"),
583
609
  link=self._get_value(item["link"], *args),
584
610
  icon=item.get("icon"),
611
+ attrs=item.get("attrs"),
585
612
  )
586
613
  for item in items
587
614
  ]