django-unfold 0.52.0__py3-none-any.whl → 0.53.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-unfold
3
- Version: 0.52.0
3
+ Version: 0.53.0
4
4
  Summary: Modern Django admin theme for seamless interface development
5
5
  License: MIT
6
6
  Keywords: django,admin,tailwind,theme
@@ -8,10 +8,10 @@ unfold/contrib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
8
8
  unfold/contrib/filters/admin/__init__.py,sha256=2pyv21jMqQVC8pnP8FOERHRH2hgZSOLQzV0BUn5wjHo,1216
9
9
  unfold/contrib/filters/admin/autocomplete_filters.py,sha256=Jh3m3iQ8YubZRQDVzHPGfpk9RulOhHkZc0N7L6KV9wc,514
10
10
  unfold/contrib/filters/admin/datetime_filters.py,sha256=cVari_7jsfeYxJoRBhcAUOr6v9XdtDtMuMs-S1Irafo,7757
11
- unfold/contrib/filters/admin/dropdown_filters.py,sha256=YiPLakTIzLuojULfpctFV0aP8DwfWLDnU-lcjoK2qnE,3354
12
- unfold/contrib/filters/admin/mixins.py,sha256=djaM5kxQFvl64GkNnhbCyo78UVNhDb0CIDiSNUXkUGo,4943
11
+ unfold/contrib/filters/admin/dropdown_filters.py,sha256=aZhBTEjtbeaOdYZK4nYRmA38usy9rhVTM4L_08MGU0I,3360
12
+ unfold/contrib/filters/admin/mixins.py,sha256=iOO89KpVmKig_4RPJem2TqIwZO-ROUjGTmoDmBkgyLk,4945
13
13
  unfold/contrib/filters/admin/numeric_filters.py,sha256=8GNmesgMmMIfEZb2IrGbaBoJuvB2FpIc7wPIPBpHat4,6420
14
- unfold/contrib/filters/admin/text_filters.py,sha256=NXyKm0Ed24N9pNfR7Dys5kTpZ_V5FUurdxk7KDMdRIg,2084
14
+ unfold/contrib/filters/admin/text_filters.py,sha256=19cOEGpSaXafcM8QuGiYaWmNi5UIQnCXEhKG-vCTfe8,2088
15
15
  unfold/contrib/filters/apps.py,sha256=wEySJy0gMLzFLb9XNKE-RexiO05X7NaQ5QmxZyziJ_k,136
16
16
  unfold/contrib/filters/forms.py,sha256=_eHiUaTKltkZ3pWG77LiWYnEVMC-2A-wj1LMLkcCPvc,7233
17
17
  unfold/contrib/filters/static/unfold/filters/css/nouislider.min.css,sha256=rddL_jOGGVEY6wR-aw0VYovAfz5fPeAIsulrlSNb1hc,4221
@@ -24,7 +24,7 @@ unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html,sha2
24
24
  unfold/contrib/filters/templates/unfold/filters/filters_field.html,sha256=UTlSZlpg-gAc_a-EJLLF0NI_ofuSHQ2kMMoAs99nL2E,164
25
25
  unfold/contrib/filters/templates/unfold/filters/filters_numeric_range.html,sha256=aHggmpsmwts78x-BfAApHkfOImg8NEMi1FEJZwTqveI,651
26
26
  unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html,sha256=fWupjTY6kInxOsm2-eEMIB3IZoslnLJmxBdOdMxO-Is,588
27
- unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html,sha256=E-OrYbFNKSyNc2yaoDB9LLuiDd_ShU5hJGlLij35NYs,1714
27
+ unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html,sha256=UDhcNnDmP9ab6UMvikRp7tNVQazoh_fUds29yhWOljs,1724
28
28
  unfold/contrib/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  unfold/contrib/forms/apps.py,sha256=Di0TMzVuRpVxLG-8Bjdq5ALCSf5r7u2xVhD0jU6H5Sc,132
30
30
  unfold/contrib/forms/static/unfold/forms/css/trix.css,sha256=TH9WdnaZrmwI8hAEydwjobdrBzSw_KYdRTSQDuD-8hE,20027
@@ -72,22 +72,23 @@ unfold/contrib/simple_history/templates/simple_history/object_history_form.html,
72
72
  unfold/contrib/simple_history/templates/simple_history/object_history_list.html,sha256=ls_xEAAgGzbu0IXdjZk7scEyEJx0S7i3Khr9ND98gzY,6842
73
73
  unfold/contrib/simple_history/templates/simple_history/submit_line.html,sha256=y8BleGHPNztA_R37rTB-zjJ68uDbE8flYSvMD0Jfl5Y,1734
74
74
  unfold/dataclasses.py,sha256=a-9INnkCAIcnMgoffTcB1rxWCJH33AjhMCWIGWnjWbI,719
75
- unfold/decorators.py,sha256=5fxobPFVlx4i-ldLm6M_ln3jFl261ZMKCcv9aXvXMVA,4082
75
+ unfold/decorators.py,sha256=15X9FdoKkgxweUqIboH7kiDrBheT3uBEFNT-JummEl0,4297
76
76
  unfold/enums.py,sha256=9sTfyEycMWeoGPBa-ft6ZhQGnW1vkFg108RMBVf9nko,187
77
77
  unfold/exceptions.py,sha256=gcCj1ox61E137bk_0Cqy4YC3SttdPgB-fiJUqpmyHSE,43
78
78
  unfold/fields.py,sha256=J3goIMlP_XOmQ85Xgh2v5MylXSP1o5I7o9_So2FQn2k,7461
79
- unfold/forms.py,sha256=BKv7eCbv29eCIuf1d_ZBmD4-_OIIzRaopiFd2nKbXNY,4520
79
+ unfold/forms.py,sha256=3MrVG9jDdDsrJHph-cimZXRycfdoAw-KhT0uJJInG7E,4552
80
80
  unfold/mixins/__init__.py,sha256=YlhoDs9Y_DXQ8Ejr3enxuHMS1-Ij9fwukxNwpeOS4Co,190
81
81
  unfold/mixins/action_model_admin.py,sha256=BPajuTGf7zAaZOqIq4shX8VQ3NTxWQpedvG58fmCTjk,12036
82
82
  unfold/mixins/base_model_admin.py,sha256=PR4eqU48yB4CNy9Bjd7fjxbOFiFpZM4etYmBOSaRX_M,4140
83
83
  unfold/overrides.py,sha256=ERVY9boZiXgjDYcTEZcIp7KWoeBZ45VM_zN31yAOjyQ,2922
84
+ unfold/paginator.py,sha256=vWCIfpuWbV3nvIkQOPyD7MLTg2hZplHz3rze42d-qiA,268
84
85
  unfold/sections.py,sha256=Lcg3xCZ76fqjm4vD4x7YdE5VsbTKluL-sX5QTEBlHxA,2379
85
86
  unfold/settings.py,sha256=3ICha2I0oSaHhajG8159nHdNTYJInBtRQq9VziWKYKs,2709
86
- unfold/sites.py,sha256=Pl8voDdMH_9RV1n3XmSz84T6OE8yDUAqNwlr-kPH1n8,16179
87
+ unfold/sites.py,sha256=fx3U0kIfN3My4UNiXO_ggrudmFvYNglMAIARaMa2gqY,16321
87
88
  unfold/static/admin/js/admin/RelatedObjectLookups.js,sha256=alI0-yq7YPDJJJn-yg1ce79-Cv88yQDUrfaGqFZnsaY,9048
88
89
  unfold/static/admin/js/inlines.js,sha256=74QODSKEkpKse4bft4wIFZquROcr2-hVTt9CEWOIJak,15061
89
90
  unfold/static/unfold/css/simplebar.css,sha256=5LLaEM11pKi6JFCOLt4XKuZxTpT9rpdq_tNlaQytFlU,4647
90
- unfold/static/unfold/css/styles.css,sha256=QfcKos7Ys3mtWm3Q6BmsAkytkpoXIjQzM3D0P_A3FY4,160310
91
+ unfold/static/unfold/css/styles.css,sha256=DupCEMUvhh3SW1rpPpT06j-M9bm4v9TYfasw0_-uf68,160274
91
92
  unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=-oiBJ7baAVtlVp8DUfO1w5GtkokElR8cIOn4RiqNleo,114840
92
93
  unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=D_PpRhThST61VjFP0keubEqFp3g7TMhr5TmUDPg_Kkg,114348
93
94
  unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=4G9rG8VTqupORmgCPtCrChRxKcMQf1Ebx9A9NhsK4IU,111268
@@ -109,11 +110,11 @@ unfold/styles.css,sha256=6lYnrPCD8anvFHGN9DZJFsW8iDn7T3qvP-i8zNWulpo,19112
109
110
  unfold/templates/admin/actions.html,sha256=aroIid16mORcx-0p8O2dOoWupEoTGX66pt-PAXjSYZ0,3063
110
111
  unfold/templates/admin/app_index.html,sha256=GSBry97gDcK3scTP-Fs4FXcSItRxxE87Wv4sDtMTlbc,1244
111
112
  unfold/templates/admin/app_list.html,sha256=VtntgHpbZdXbt_HXBLAtbuMdz1alS7F_S7eG37M5Rig,2855
112
- unfold/templates/admin/auth/user/add_form.html,sha256=kZDtUyhrvCIH9rlAq0iXLKYt97j1a-GsrWZQCQDASYM,479
113
+ unfold/templates/admin/auth/user/add_form.html,sha256=37sLn-uhMh5vt0wCaL9lu1IPzdJlfq9HGpRYbTZLcEw,478
113
114
  unfold/templates/admin/auth/user/change_password.html,sha256=OxpsKnVQm5lDrK5tGH0EAPFCPs288m0Jcy5WNYsdBXw,2896
114
115
  unfold/templates/admin/base.html,sha256=3xQmoD_7cu2UlgEdvnt7v_CibT9t1Iul0b-VU2Awu_U,2395
115
116
  unfold/templates/admin/base_site.html,sha256=UOsecaCycpyn_ygJNIKO7MQtDFJuHv--r83-mzaVY30,300
116
- unfold/templates/admin/change_form.html,sha256=TsKop_uAiuM3LLlW5YQ-9-zsTpbnOnCfIF2yMUn7NB8,5408
117
+ unfold/templates/admin/change_form.html,sha256=ZVOtRNTppyhWddRs3qdyWIznWXRl6QGsIzDO8-C-Puk,5665
117
118
  unfold/templates/admin/change_form_object_tools.html,sha256=eyeH-i2HgEM0Yi-OJA2D1VnKJyC19A_my1IDGxxoP8Y,593
118
119
  unfold/templates/admin/change_list.html,sha256=AhGUdt-S3m30WhSraWnBdLwZQ1JU9yZeVDL0WDqCEMI,5164
119
120
  unfold/templates/admin/change_list_object_tools.html,sha256=cmMiT2nT20Ph5yfpj9aHPr76Z-JP4aSXp0o-Rnad28s,147
@@ -130,7 +131,7 @@ unfold/templates/admin/index.html,sha256=JnNDpNKqFKVKMQvpUQo6ddcFqGadK5g78pxpKAH
130
131
  unfold/templates/admin/login.html,sha256=5khGm_cafDVQaDRwaTtix4g2DH4R4LrwgqO0S4aumaE,4476
131
132
  unfold/templates/admin/nav_sidebar.html,sha256=cadJwXcReRHwVTpXGycF3uv5VZ5JDcIbY1pCabeQlCo,250
132
133
  unfold/templates/admin/object_history.html,sha256=bfad4_lfLQFcoMV67yW7BnAi1Hwrptmgxj2tgPYQjtI,4816
133
- unfold/templates/admin/pagination.html,sha256=1UIc6Hm2LnDDAHUE5UjuPzdFdiAat4tF6sk058UfRP0,2251
134
+ unfold/templates/admin/pagination.html,sha256=k0OfgbKSu6HzP0zfAOHC4hswFk1Xc8XEQYfuqJxQQT4,1734
134
135
  unfold/templates/admin/search_form.html,sha256=eQkwq4OWVgNUSjZPzxAjtT4LcxUNcTSgDVKJ4lWwslQ,1447
135
136
  unfold/templates/admin/submit_line.html,sha256=GN86RzCT3aETQDC5ROMWesxf0QhqIFD218jee_P1_u4,4832
136
137
  unfold/templates/auth/widgets/read_only_password_hash.html,sha256=bQiYKDKJkyVP0_2eJG16oKviB4WEA0V7lSp6sGfgows,751
@@ -177,7 +178,7 @@ unfold/templates/unfold/helpers/empty_results.html,sha256=KV9DLKLURDtlkjDI88u05l
177
178
  unfold/templates/unfold/helpers/field.html,sha256=Ds-zUHkdyxamfUCVNhxvtM0XoJg9OCA0QcsLbLWv4oo,882
178
179
  unfold/templates/unfold/helpers/field_readonly.html,sha256=4qtXjWE7SA2qZSTYLOv0lT4pQfD0TE34mvWQJY7jhS8,237
179
180
  unfold/templates/unfold/helpers/field_readonly_value.html,sha256=6DNteF8x6_tihQZVCGgz2CqB0ogsLRJhxgDep0sHguc,464
180
- unfold/templates/unfold/helpers/fieldset_row.html,sha256=GSrMJZSNY1Tn6y3APOAeADg8Vdsa9QO_RMtj4I2SvQM,445
181
+ unfold/templates/unfold/helpers/fieldset_row.html,sha256=LriorPLXU4VmqstjX1oBc3T49H8CbhCrRxwQ7YfUSkI,1219
181
182
  unfold/templates/unfold/helpers/fieldset_row_checkbox.html,sha256=fJh5dZstm8f8pPTbN1pg5VSYPkQB4EnqSfh9RpsxdXk,1472
182
183
  unfold/templates/unfold/helpers/fieldset_row_field.html,sha256=xXxmELXMXzbNclp36rQn_09Uekq-RQkDP3kRT0Bp6rA,643
183
184
  unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=KW2rzVqpIICEu55GR_KnuOoXOGnqTZOQAKIuW-u8cAU,1459
@@ -199,21 +200,23 @@ unfold/templates/unfold/helpers/messages.html,sha256=I9RIKfi4T65AG16-2s0C32RwbFk
199
200
  unfold/templates/unfold/helpers/navigation.html,sha256=HNr9bxZOg84zsbgORkOhJFXKSp0c2im438yiWCfonb0,787
200
201
  unfold/templates/unfold/helpers/navigation_header.html,sha256=upSSMGsqVzk_HfNINcapUtmR_d8kV2yxdwPEjMbRknY,1402
201
202
  unfold/templates/unfold/helpers/pagination_current_item.html,sha256=4cZ2KLVcP0Y7xuGyXgexDQ07r94cgM5Gnmtv11dkRPQ,69
203
+ unfold/templates/unfold/helpers/pagination_default.html,sha256=pseTrqaG5EOn_IpCy0GXNht3ickSkZYJ4lJaocZeI6A,496
202
204
  unfold/templates/unfold/helpers/pagination_ellipsis.html,sha256=8g0KUUKtqRkXx_EBLGtsJsiYQO4tPS3GazZjxT90e0M,56
205
+ unfold/templates/unfold/helpers/pagination_infinite.html,sha256=-U1i-90jxzJVui56NvuJ1OxrywN8QLrs-IRu9KLmN20,422
203
206
  unfold/templates/unfold/helpers/search.html,sha256=w8Ute3qVfSIqUXzA3TKOx91RzW_qnffFi2Oe9qedtV4,1643
204
207
  unfold/templates/unfold/helpers/search_results.html,sha256=5gxOAfFBPOkRgDziyYio6ZXcDG1bzFw7t-KXGFaWrUk,653
205
208
  unfold/templates/unfold/helpers/site_branding.html,sha256=_pUyOvdjlV624eRq0wjpJkgXpn9DCDGc-0U6Mw0FupI,266
206
209
  unfold/templates/unfold/helpers/site_dropdown.html,sha256=Zwg5ZGVIEHAI2h-YcWDDBz3QD2nYsP9m530wYArFk5I,878
207
- unfold/templates/unfold/helpers/site_icon.html,sha256=rB6oc6VBB0T7wtyGOPcrq6qepDRaA54F6-Wxtaru-ks,1297
210
+ unfold/templates/unfold/helpers/site_icon.html,sha256=qSEpI1RrNlk6ad6HDiBa74vjsYqGgmEgVbfSXdyyMLI,1485
208
211
  unfold/templates/unfold/helpers/site_logo.html,sha256=S_QJoT2qh0xw0ciaKxoT4GJ6QIH5eqgRSC0abbWWkOI,423
209
212
  unfold/templates/unfold/helpers/submit.html,sha256=4Mgf4lx7Atm8GPqD6LTJK3NA9zoSJjs9VPig7sDp8Ao,203
210
- unfold/templates/unfold/helpers/tab_action.html,sha256=6N6Xi7XGtweS6gt0oZrVu6AIaJ9WIQSH-mpndn0CCYE,2263
213
+ unfold/templates/unfold/helpers/tab_action.html,sha256=s_nWsB350qtjsn_u3EJpIRfAM7uLc40z1amVel469nw,2261
211
214
  unfold/templates/unfold/helpers/tab_actions.html,sha256=DMNqY1YyrNrcutOMC3J1neZZjIkPeYShp1i5xZ10nrc,695
212
215
  unfold/templates/unfold/helpers/tab_items.html,sha256=Gi6cjYJ7tJWO6zSXjg8xNHY9ALpYzjQOEORusf_AZfg,3325
213
216
  unfold/templates/unfold/helpers/tab_list.html,sha256=Tqkug9GyoIQ2geVKWrnnuE0bxeTRXj0MSEwwixoOGz4,436
214
217
  unfold/templates/unfold/helpers/theme_switch.html,sha256=Kh3Q8RuBWCUuY8YJLwBwd5yKzDhK6y0Ggx_ERoGEGv8,2218
215
218
  unfold/templates/unfold/helpers/userlinks.html,sha256=oZqiwCxG_zRecAbzYrr8_hQvkndVB6-liP6LEZM1UZc,863
216
- unfold/templates/unfold/helpers/welcomemsg.html,sha256=a7VjZ8J1mn-DAo57nhUP096SEcBOqcCWrWt2qoT0cyg,1882
219
+ unfold/templates/unfold/helpers/welcomemsg.html,sha256=uncDEg3j6NsSKCGOA7uVY-GCxsacktV3-bQrd-vn5FU,1940
217
220
  unfold/templates/unfold/layouts/base.html,sha256=e9T-vuPvrySHf23LLwRuTQXUg0Q4x-6gmT_yXghqc-I,278
218
221
  unfold/templates/unfold/layouts/base_simple.html,sha256=VigjNWnWOt_XtbahvqsroPf8mdwl7cDGbg5fEaLmG9s,1211
219
222
  unfold/templates/unfold/layouts/skeleton.html,sha256=TmZ0hX5j7McwSiYcdGGuhAjDunPDCWtPC7lDF6hbtDk,4641
@@ -233,13 +236,13 @@ unfold/templates/unfold/widgets/textarea.html,sha256=-ZLDGrtASero7L-J3VvTNq_KjPA
233
236
  unfold/templates/unfold/widgets/time.html,sha256=ih9wj8koTaHb9s1NGUmyN9rHvSAmqCMbti9ONDOIujg,122
234
237
  unfold/templates/unfold/widgets/url.html,sha256=IRLgW44VTKN7UrSWeywJwaxQhfG5jhhXuT-KTadKX58,304
235
238
  unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
236
- unfold/templatetags/unfold.py,sha256=rNpa1B9bEM-HQRWEss4PZ_nwnTRR8L3J12qOcjR5A_k,14550
239
+ unfold/templatetags/unfold.py,sha256=JOjKCq2rfoKkqNqA7G6mjq2YvFt32jSLGKHxQ2cSluI,15987
237
240
  unfold/templatetags/unfold_list.py,sha256=ayShOYEXcV3o7wKt3t2aFTWvg62Mb-WGlxjYVGgk3a0,14344
238
241
  unfold/typing.py,sha256=i7LM2LiwYTAjT5-OLDUPVn5b9X-DMmHnjlZG2toWwSE,692
239
- unfold/utils.py,sha256=oB71xynQQEXj055BkTVwc4pz5hXk6tipFBAIU8TWDyA,5838
242
+ unfold/utils.py,sha256=SJikRuAuJN0bE9rfzUujZwycTRrzQm14Hk0zB0EwivU,6164
240
243
  unfold/views.py,sha256=FuYnMrlg6SegLUDDN6An__yZj8rchD_iBK8myieYhkA,1492
241
244
  unfold/widgets.py,sha256=eiFuIS6vWxEWwDBw9O6705ZWQa81wjWknbC37cCAFzA,20263
242
- django_unfold-0.52.0.dist-info/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
243
- django_unfold-0.52.0.dist-info/METADATA,sha256=u958OA_otWoONnSKCrFKghqfe_j_9r6LzyZAJD0c2uE,5929
244
- django_unfold-0.52.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
245
- django_unfold-0.52.0.dist-info/RECORD,,
245
+ django_unfold-0.53.0.dist-info/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
246
+ django_unfold-0.53.0.dist-info/METADATA,sha256=WSVzgcFxbK-zYYWdMsKJhBKusPR-u7Poh9d1KUGKgxI,5929
247
+ django_unfold-0.53.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
248
+ django_unfold-0.53.0.dist-info/RECORD,,
@@ -25,7 +25,7 @@ class DropdownFilter(admin.SimpleListFilter):
25
25
  return (
26
26
  {
27
27
  "form": self.form_class(
28
- label=_("By %(filter_title)s") % {"filter_title": self.title},
28
+ label=_(" By %(filter_title)s ") % {"filter_title": self.title},
29
29
  name=self.parameter_name,
30
30
  choices=[self.all_option, *self.lookup_choices],
31
31
  data={self.parameter_name: self.value()},
@@ -58,7 +58,7 @@ class ChoicesDropdownFilter(ValueMixin, DropdownMixin, admin.ChoicesFieldListFil
58
58
 
59
59
  yield {
60
60
  "form": self.form_class(
61
- label=_("By %(filter_title)s") % {"filter_title": self.title},
61
+ label=_(" By %(filter_title)s ") % {"filter_title": self.title},
62
62
  name=self.lookup_kwarg,
63
63
  choices=choices,
64
64
  data={self.lookup_kwarg: self.value()},
@@ -88,7 +88,7 @@ class RelatedDropdownFilter(ValueMixin, DropdownMixin, admin.RelatedFieldListFil
88
88
  def choices(self, changelist: ChangeList) -> Generator[dict[str, Any], None, None]:
89
89
  yield {
90
90
  "form": self.form_class(
91
- label=_("By %(filter_title)s") % {"filter_title": self.title},
91
+ label=_(" By %(filter_title)s ") % {"filter_title": self.title},
92
92
  name=self.lookup_kwarg,
93
93
  choices=[self.all_option, *self.lookup_choices],
94
94
  data={self.lookup_kwarg: self.value()},
@@ -141,7 +141,7 @@ class AutocompleteMixin:
141
141
  yield {
142
142
  "form": self.form_class(
143
143
  request=self.request,
144
- label=_("By %(filter_title)s") % {"filter_title": self.title},
144
+ label=_(" By %(filter_title)s ") % {"filter_title": self.title},
145
145
  name=self.lookup_kwarg,
146
146
  choices=(),
147
147
  field=self.field,
@@ -26,7 +26,7 @@ class TextFilter(admin.SimpleListFilter):
26
26
  {
27
27
  "form": self.form_class(
28
28
  name=self.parameter_name,
29
- label=_("By %(filter_title)s") % {"filter_title": self.title},
29
+ label=_(" By %(filter_title)s ") % {"filter_title": self.title},
30
30
  data={self.parameter_name: self.value()},
31
31
  ),
32
32
  },
@@ -57,7 +57,7 @@ class FieldTextFilter(ValueMixin, admin.FieldListFilter):
57
57
  return (
58
58
  {
59
59
  "form": self.form_class(
60
- label=_("By %(filter_title)s") % {"filter_title": self.title},
60
+ label=_(" By %(filter_title)s ") % {"filter_title": self.title},
61
61
  name=self.lookup_kwarg,
62
62
  data={self.lookup_kwarg: self.value()},
63
63
  ),
@@ -4,7 +4,7 @@
4
4
  {% with choices.0 as choice %}
5
5
  <div class="admin-numeric-filter-wrapper">
6
6
  <h3 class="font-semibold mb-2 text-font-important-light dark:text-font-important-dark">
7
- {% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}
7
+ {% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}
8
8
  </h3>
9
9
 
10
10
  {% if choice.min is not None and choice.max is not None and choice.step %}
unfold/decorators.py CHANGED
@@ -37,13 +37,19 @@ def action(
37
37
  # Permissions methods have following syntax: has_<some>_permission(self, request, obj=None):
38
38
  # But obj is not examined by default in django admin and it would also require additional
39
39
  # fetch from database, therefore it is not supported yet
40
- has_object_argument = (
41
- func.__name__ in model_admin.actions_detail
42
- or func.__name__ in model_admin.actions_submit_line
40
+ has_detail_action = func.__name__ in model_admin._extract_action_names(
41
+ model_admin.actions_detail
43
42
  )
43
+ has_submit_line_action = (
44
+ func.__name__
45
+ in model_admin._extract_action_names(
46
+ model_admin.actions_submit_line
47
+ )
48
+ )
49
+
44
50
  if not all(
45
51
  has_permission(request, kwargs.get("object_id"))
46
- if has_object_argument
52
+ if has_detail_action or has_submit_line_action
47
53
  else has_permission(request)
48
54
  for has_permission in permission_checks
49
55
  ):
unfold/forms.py CHANGED
@@ -50,8 +50,9 @@ class ActionForm(forms.Form):
50
50
  "pr-8",
51
51
  "rounded",
52
52
  "text-white",
53
+ "truncate",
53
54
  "*:text-base-700",
54
- "lg:min-w-72",
55
+ "lg:w-72",
55
56
  ]
56
57
  ),
57
58
  "aria-label": _("Select action to run"),
unfold/paginator.py ADDED
@@ -0,0 +1,10 @@
1
+ from django.core.paginator import Paginator
2
+ from django.utils.functional import cached_property
3
+
4
+
5
+ class InfinitePaginator(Paginator):
6
+ template_name = "unfold/helpers/pagination_infinite.html"
7
+
8
+ @cached_property
9
+ def count(self):
10
+ return 9_999_999_999
unfold/sites.py CHANGED
@@ -231,14 +231,16 @@ class UnfoldAdminSite(AdminSite):
231
231
  tabs = self._get_value(self._get_config("TABS", request), request) or []
232
232
  results = []
233
233
 
234
- for group in navigation:
234
+ for group in copy.deepcopy(navigation):
235
235
  allowed_items = []
236
236
 
237
237
  for item in group["items"]:
238
- item["active"] = False
239
- item["active"] = self._get_is_active(
240
- request, item.get("link_callback") or item["link"]
241
- )
238
+ if "active" in item:
239
+ item["active"] = self._get_value(item["active"], request)
240
+ else:
241
+ item["active"] = self._get_is_active(
242
+ request, item.get("link_callback") or item["link"]
243
+ )
242
244
 
243
245
  # Checks if any tab item is active and then marks the sidebar link as active
244
246
  for tab in tabs:
@@ -342,7 +344,7 @@ class UnfoldAdminSite(AdminSite):
342
344
  return target
343
345
 
344
346
  def _get_is_active(
345
- self, request: HttpRequest, link: str, is_tab: bool = False
347
+ self, request: HttpRequest, link: Union[str, Callable], is_tab: bool = False
346
348
  ) -> bool:
347
349
  if not isinstance(link, str):
348
350
  link = str(link)