django-unfold 0.53.0__py3-none-any.whl → 0.54.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.53.0.dist-info → django_unfold-0.54.0.dist-info}/METADATA +1 -1
- {django_unfold-0.53.0.dist-info → django_unfold-0.54.0.dist-info}/RECORD +25 -24
- {django_unfold-0.53.0.dist-info → django_unfold-0.54.0.dist-info}/WHEEL +1 -1
- unfold/contrib/filters/admin/__init__.py +17 -0
- unfold/contrib/filters/admin/choice_filters.py +134 -0
- unfold/contrib/filters/forms.py +41 -3
- unfold/contrib/filters/templates/unfold/filters/filters_date_range.html +1 -1
- unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html +1 -1
- unfold/static/admin/js/inlines.js +23 -3
- unfold/static/unfold/css/styles.css +1 -1
- unfold/styles.css +2 -1
- unfold/templates/admin/change_list.html +15 -13
- unfold/templates/admin/change_list_results.html +1 -1
- unfold/templates/admin/edit_inline/tabular.html +1 -2
- unfold/templates/unfold/components/chart/cohort.html +2 -2
- unfold/templates/unfold/helpers/change_list_filter.html +2 -2
- unfold/templates/unfold/helpers/change_list_filter_actions.html +28 -26
- unfold/templates/unfold/helpers/edit_inline/tabular_field.html +10 -8
- unfold/templates/unfold/helpers/field.html +4 -2
- unfold/templates/unfold/helpers/form_label.html +1 -1
- unfold/templates/unfold/helpers/tab_action.html +17 -2
- unfold/templates/unfold/widgets/radio_option.html +1 -1
- unfold/templatetags/unfold.py +11 -5
- unfold/widgets.py +2 -0
- {django_unfold-0.53.0.dist-info → django_unfold-0.54.0.dist-info}/LICENSE.md +0 -0
@@ -5,22 +5,23 @@ unfold/checks.py,sha256=8I3i4xR_KgyJdpQyZUZzKNeyYf-sNzg6PAlsREuMfgI,1664
|
|
5
5
|
unfold/components.py,sha256=vqkQzseYUvLXDohmTVAlbKopALjyX4WA9yglvdfhqu4,1283
|
6
6
|
unfold/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
unfold/contrib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
unfold/contrib/filters/admin/__init__.py,sha256=
|
8
|
+
unfold/contrib/filters/admin/__init__.py,sha256=7pooAoA2Y9MbBL_RTJBZeIAwV5ECrOvMbe0_egoHfew,1663
|
9
9
|
unfold/contrib/filters/admin/autocomplete_filters.py,sha256=Jh3m3iQ8YubZRQDVzHPGfpk9RulOhHkZc0N7L6KV9wc,514
|
10
|
+
unfold/contrib/filters/admin/choice_filters.py,sha256=pDBGb4uAbAKgZB3ChEVRy6us20JktRtdDfCjquPJKa4,4377
|
10
11
|
unfold/contrib/filters/admin/datetime_filters.py,sha256=cVari_7jsfeYxJoRBhcAUOr6v9XdtDtMuMs-S1Irafo,7757
|
11
12
|
unfold/contrib/filters/admin/dropdown_filters.py,sha256=aZhBTEjtbeaOdYZK4nYRmA38usy9rhVTM4L_08MGU0I,3360
|
12
13
|
unfold/contrib/filters/admin/mixins.py,sha256=iOO89KpVmKig_4RPJem2TqIwZO-ROUjGTmoDmBkgyLk,4945
|
13
14
|
unfold/contrib/filters/admin/numeric_filters.py,sha256=8GNmesgMmMIfEZb2IrGbaBoJuvB2FpIc7wPIPBpHat4,6420
|
14
15
|
unfold/contrib/filters/admin/text_filters.py,sha256=19cOEGpSaXafcM8QuGiYaWmNi5UIQnCXEhKG-vCTfe8,2088
|
15
16
|
unfold/contrib/filters/apps.py,sha256=wEySJy0gMLzFLb9XNKE-RexiO05X7NaQ5QmxZyziJ_k,136
|
16
|
-
unfold/contrib/filters/forms.py,sha256=
|
17
|
+
unfold/contrib/filters/forms.py,sha256=8p1JKYSqzB-GkUQloy-CM3aprhtTgJhI05aCG-qSdkw,8069
|
17
18
|
unfold/contrib/filters/static/unfold/filters/css/nouislider.min.css,sha256=rddL_jOGGVEY6wR-aw0VYovAfz5fPeAIsulrlSNb1hc,4221
|
18
19
|
unfold/contrib/filters/static/unfold/filters/js/DateTimeShortcuts.js,sha256=jgFNBDf6aHvUlyv0LEDHggXO-xA8pWOCWFWcVupdA30,19332
|
19
20
|
unfold/contrib/filters/static/unfold/filters/js/admin-numeric-filter.js,sha256=nTkiiJk4Abn9d6KigxPSEsereFhFq-v5n_boiiY1eII,1668
|
20
21
|
unfold/contrib/filters/static/unfold/filters/js/nouislider.min.js,sha256=aIEt5UlLNnEv4-HPyxcLqu9dTS7gXiMm35Mm0rFmQ0Q,26683
|
21
22
|
unfold/contrib/filters/static/unfold/filters/js/wNumb.min.js,sha256=gayD3el5iizhy0DlsyKfZvfOfOZHDmb7BPvOcT97GSg,2236
|
22
|
-
unfold/contrib/filters/templates/unfold/filters/filters_date_range.html,sha256=
|
23
|
-
unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html,sha256=
|
23
|
+
unfold/contrib/filters/templates/unfold/filters/filters_date_range.html,sha256=PeY1O1YiqjFHt4iExWTf1084uHS6bLVHFWe_reCigqk,673
|
24
|
+
unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html,sha256=PeY1O1YiqjFHt4iExWTf1084uHS6bLVHFWe_reCigqk,673
|
24
25
|
unfold/contrib/filters/templates/unfold/filters/filters_field.html,sha256=UTlSZlpg-gAc_a-EJLLF0NI_ofuSHQ2kMMoAs99nL2E,164
|
25
26
|
unfold/contrib/filters/templates/unfold/filters/filters_numeric_range.html,sha256=aHggmpsmwts78x-BfAApHkfOImg8NEMi1FEJZwTqveI,651
|
26
27
|
unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html,sha256=fWupjTY6kInxOsm2-eEMIB3IZoslnLJmxBdOdMxO-Is,588
|
@@ -86,9 +87,9 @@ unfold/sections.py,sha256=Lcg3xCZ76fqjm4vD4x7YdE5VsbTKluL-sX5QTEBlHxA,2379
|
|
86
87
|
unfold/settings.py,sha256=3ICha2I0oSaHhajG8159nHdNTYJInBtRQq9VziWKYKs,2709
|
87
88
|
unfold/sites.py,sha256=fx3U0kIfN3My4UNiXO_ggrudmFvYNglMAIARaMa2gqY,16321
|
88
89
|
unfold/static/admin/js/admin/RelatedObjectLookups.js,sha256=alI0-yq7YPDJJJn-yg1ce79-Cv88yQDUrfaGqFZnsaY,9048
|
89
|
-
unfold/static/admin/js/inlines.js,sha256=
|
90
|
+
unfold/static/admin/js/inlines.js,sha256=zcYwLGI_6RHg-gucDbbhp43RRoZd3so8bPk841KFaIE,15573
|
90
91
|
unfold/static/unfold/css/simplebar.css,sha256=5LLaEM11pKi6JFCOLt4XKuZxTpT9rpdq_tNlaQytFlU,4647
|
91
|
-
unfold/static/unfold/css/styles.css,sha256
|
92
|
+
unfold/static/unfold/css/styles.css,sha256=-tB48trW_4YUmPdnHYP31ulsXOPiwsC6s6hHffmDW_w,161933
|
92
93
|
unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=-oiBJ7baAVtlVp8DUfO1w5GtkokElR8cIOn4RiqNleo,114840
|
93
94
|
unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=D_PpRhThST61VjFP0keubEqFp3g7TMhr5TmUDPg_Kkg,114348
|
94
95
|
unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=4G9rG8VTqupORmgCPtCrChRxKcMQf1Ebx9A9NhsK4IU,111268
|
@@ -106,7 +107,7 @@ unfold/static/unfold/js/chart.js,sha256=22W6cFERR-CElMOKRgMMicueMVP0Vf7FBEBYH8Z8
|
|
106
107
|
unfold/static/unfold/js/htmx.js,sha256=acrv0NqSJpBm5yXX_hdeJrnVDJYuMFZFnAxHcVTNudM,50918
|
107
108
|
unfold/static/unfold/js/select2.init.js,sha256=gXZngZh-l5ID2-VmndpGseNi6A0zKB18UgPyCor68CU,1040
|
108
109
|
unfold/static/unfold/js/simplebar.js,sha256=t-uG1FAD6ZoiMeN--wac0XRS7SxoDVG6zvRnGuEp7X8,27176
|
109
|
-
unfold/styles.css,sha256=
|
110
|
+
unfold/styles.css,sha256=Mbe0mO2608aH3bCVllxTKb6OcsMIy-ZAugcwaWBwM0E,19142
|
110
111
|
unfold/templates/admin/actions.html,sha256=aroIid16mORcx-0p8O2dOoWupEoTGX66pt-PAXjSYZ0,3063
|
111
112
|
unfold/templates/admin/app_index.html,sha256=GSBry97gDcK3scTP-Fs4FXcSItRxxE87Wv4sDtMTlbc,1244
|
112
113
|
unfold/templates/admin/app_list.html,sha256=VtntgHpbZdXbt_HXBLAtbuMdz1alS7F_S7eG37M5Rig,2855
|
@@ -116,14 +117,14 @@ unfold/templates/admin/base.html,sha256=3xQmoD_7cu2UlgEdvnt7v_CibT9t1Iul0b-VU2Aw
|
|
116
117
|
unfold/templates/admin/base_site.html,sha256=UOsecaCycpyn_ygJNIKO7MQtDFJuHv--r83-mzaVY30,300
|
117
118
|
unfold/templates/admin/change_form.html,sha256=ZVOtRNTppyhWddRs3qdyWIznWXRl6QGsIzDO8-C-Puk,5665
|
118
119
|
unfold/templates/admin/change_form_object_tools.html,sha256=eyeH-i2HgEM0Yi-OJA2D1VnKJyC19A_my1IDGxxoP8Y,593
|
119
|
-
unfold/templates/admin/change_list.html,sha256=
|
120
|
+
unfold/templates/admin/change_list.html,sha256=o3nPQUHo9rCpaNfoGfBl1owhIDvk_gwSESbCP0bK_YQ,5291
|
120
121
|
unfold/templates/admin/change_list_object_tools.html,sha256=cmMiT2nT20Ph5yfpj9aHPr76Z-JP4aSXp0o-Rnad28s,147
|
121
|
-
unfold/templates/admin/change_list_results.html,sha256=
|
122
|
+
unfold/templates/admin/change_list_results.html,sha256=H7JtxfZSRIwYQTYdBAumFpkATETSE2rvNgwCsUSGzno,7931
|
122
123
|
unfold/templates/admin/date_hierarchy.html,sha256=Jl_Vk05fXvsSvod5Dw2p3KhpCQGjtSX1zqlNjjkBFR4,1411
|
123
124
|
unfold/templates/admin/delete_confirmation.html,sha256=yT_NHbFHZEjkSCaGVcM52GCG-FDmWiJdTFLbq9CBCx4,4619
|
124
125
|
unfold/templates/admin/delete_selected_confirmation.html,sha256=QR0JhrPR8YI8KpQnB3xyrKxaui-_pEQmfaMDbcXjjZ0,4391
|
125
126
|
unfold/templates/admin/edit_inline/stacked.html,sha256=-ASy7Jd0SwWBDxurucbus86YT2AokJEcCUrqPlHVDQA,7644
|
126
|
-
unfold/templates/admin/edit_inline/tabular.html,sha256=
|
127
|
+
unfold/templates/admin/edit_inline/tabular.html,sha256=GFXgOwMK0WZfFtMdfw7JMAXTUmW7cavEh9FYQ2dTgh4,2893
|
127
128
|
unfold/templates/admin/filter.html,sha256=0B_hpLybHw1wUPPCN3KJvoWrx03iFeqP8m1LRCjnLlQ,2012
|
128
129
|
unfold/templates/admin/includes/fieldset.html,sha256=gX-dc-jPLswk21XSKUXzAU8WFl3CFfeVrIAU2bviPyg,812
|
129
130
|
unfold/templates/admin/includes/object_delete_summary.html,sha256=FgwfapZCKWtnFtTHqh1MRuxxLot4bAw92WCcR_V8ImI,444
|
@@ -141,7 +142,7 @@ unfold/templates/registration/password_change_form.html,sha256=EgakVWzpQUEJKQS0A
|
|
141
142
|
unfold/templates/unfold/components/button.html,sha256=TABo79ppuGlm2ENvRs6L3Vne8B5_9he_OhZTnPMiitQ,473
|
142
143
|
unfold/templates/unfold/components/card.html,sha256=FVLN7kQZqMd_uhEi1LpiN9FUxZCa4RgGHYGmofCtQro,1141
|
143
144
|
unfold/templates/unfold/components/chart/bar.html,sha256=nDdDCUXvFd793OpNgNPQo0vBmvYngMsQyPHVTf1vfOw,297
|
144
|
-
unfold/templates/unfold/components/chart/cohort.html,sha256=
|
145
|
+
unfold/templates/unfold/components/chart/cohort.html,sha256=wDjRb2IT1XEJ--Y1BrSaMOeM7XXy9iohJR_4RZ2ilSs,2362
|
145
146
|
unfold/templates/unfold/components/chart/line.html,sha256=DHaZUFTlCs5cX7ioYdTzoN4ITHWNcEoNSUp7v3hlo_E,298
|
146
147
|
unfold/templates/unfold/components/container.html,sha256=WBk1rGHnTsObi3pJCpL3dfFAUQ2abDmokU0Lee7R9CI,83
|
147
148
|
unfold/templates/unfold/components/flex.html,sha256=_hBsQLJ6-7MfEfXNp5Wy-ykNtPMnnNg_io2IMGegn3s,134
|
@@ -162,20 +163,20 @@ unfold/templates/unfold/helpers/attrs.html,sha256=Mwpj72kuwYj8hOT3J2T8qx6f1r_4xw
|
|
162
163
|
unfold/templates/unfold/helpers/boolean.html,sha256=kcSZr3siQeBWIy_jsx1tFf4m6IB3ooRnu8UUNQrh6so,569
|
163
164
|
unfold/templates/unfold/helpers/breadcrumb_item.html,sha256=9T6ojN7LOXIlgwSwlIwHgy5U22eQYtarCqcmzsQIoPU,201
|
164
165
|
unfold/templates/unfold/helpers/change_list_actions.html,sha256=p1_vC2Q_Fb-gAHA8y1zzOXqqn5TPQMrQfE26PkOY_ok,656
|
165
|
-
unfold/templates/unfold/helpers/change_list_filter.html,sha256=
|
166
|
-
unfold/templates/unfold/helpers/change_list_filter_actions.html,sha256=
|
166
|
+
unfold/templates/unfold/helpers/change_list_filter.html,sha256=oAWtb29vT0g2myp7IqLr_a7O72TboxUskwOEId4ZnpY,1921
|
167
|
+
unfold/templates/unfold/helpers/change_list_filter_actions.html,sha256=_D_ub3xh9sJFiM4BbmfdlvZzXb8rXQEwY9yQn6KM2Xc,1973
|
167
168
|
unfold/templates/unfold/helpers/delete_submit_line.html,sha256=N1w_TDIDN7Spj5diuhRUVOVgz2TiSeHVK2QvBjTLv2w,665
|
168
169
|
unfold/templates/unfold/helpers/display_dropdown.html,sha256=e83t_lR2uSxnNoDYKnTKyD57V3FTMCM9T0h0DeFdAV8,2850
|
169
170
|
unfold/templates/unfold/helpers/display_header.html,sha256=rhru2GSxR0mH8_FEQuQVIS8gGGjaiWMV9f2HCPGMsaQ,1698
|
170
171
|
unfold/templates/unfold/helpers/display_label.html,sha256=LS9DWzYjHkYLV27sZDwyXlg2sLJ0AlId9FbjnXpsbfg,317
|
171
172
|
unfold/templates/unfold/helpers/edit_inline/tabular_delete.html,sha256=KFp6d8whXp2DlRyHJF1OsCkJa3Vy-UU-nkQXSlpuui0,928
|
172
173
|
unfold/templates/unfold/helpers/edit_inline/tabular_error.html,sha256=8XGlgUJ47JllmXhwPZDlcl81NzZmvuBIp8FZBWoeu9Q,336
|
173
|
-
unfold/templates/unfold/helpers/edit_inline/tabular_field.html,sha256=
|
174
|
+
unfold/templates/unfold/helpers/edit_inline/tabular_field.html,sha256=JDcSvqozjjNB1wAXcmJCi1xI1iXQAIxylHz4PYTPMkU,1002
|
174
175
|
unfold/templates/unfold/helpers/edit_inline/tabular_heading.html,sha256=ER8R64wnKOu26WTwP4_Wxt-LRB_zRkXLhheZ_utVvKY,1523
|
175
176
|
unfold/templates/unfold/helpers/edit_inline/tabular_row.html,sha256=Cfs2m5eh3mLcMgL0_dSAokAscgq4q19KsnUPZECmDgw,2013
|
176
177
|
unfold/templates/unfold/helpers/edit_inline/tabular_title.html,sha256=JPSue6mD1-KZ3tiymbRrv1G2XgsSim4cT_6HhzYJaYY,2710
|
177
178
|
unfold/templates/unfold/helpers/empty_results.html,sha256=KV9DLKLURDtlkjDI88u05l6cXiOoeSv1nR4wFNIQ2hE,1933
|
178
|
-
unfold/templates/unfold/helpers/field.html,sha256=
|
179
|
+
unfold/templates/unfold/helpers/field.html,sha256=awM8lUlERpPSSz9TczWrMvxXzY8jGbEvix0JzWvHMVE,979
|
179
180
|
unfold/templates/unfold/helpers/field_readonly.html,sha256=4qtXjWE7SA2qZSTYLOv0lT4pQfD0TE34mvWQJY7jhS8,237
|
180
181
|
unfold/templates/unfold/helpers/field_readonly_value.html,sha256=6DNteF8x6_tihQZVCGgz2CqB0ogsLRJhxgDep0sHguc,464
|
181
182
|
unfold/templates/unfold/helpers/fieldset_row.html,sha256=LriorPLXU4VmqstjX1oBc3T49H8CbhCrRxwQ7YfUSkI,1219
|
@@ -183,7 +184,7 @@ unfold/templates/unfold/helpers/fieldset_row_checkbox.html,sha256=fJh5dZstm8f8pP
|
|
183
184
|
unfold/templates/unfold/helpers/fieldset_row_field.html,sha256=xXxmELXMXzbNclp36rQn_09Uekq-RQkDP3kRT0Bp6rA,643
|
184
185
|
unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=KW2rzVqpIICEu55GR_KnuOoXOGnqTZOQAKIuW-u8cAU,1459
|
185
186
|
unfold/templates/unfold/helpers/form_errors.html,sha256=EwerIJptSCWXvtAJ1IZKfEn98qlShBIGavsTThbklAs,266
|
186
|
-
unfold/templates/unfold/helpers/form_label.html,sha256=
|
187
|
+
unfold/templates/unfold/helpers/form_label.html,sha256=7FfaXfviQmqKpsA1E7NSwM8rJiMNLl9e73XQram0Pfs,249
|
187
188
|
unfold/templates/unfold/helpers/header.html,sha256=ZoQH_Fs1v7fbo6fWQ5UEgfM9xPQlsYQxeabLf7nndB8,1050
|
188
189
|
unfold/templates/unfold/helpers/header_back_button.html,sha256=6DXkxsZJnIt0Z_AILDJNlj1gntEetFD-_b40mWFXwro,413
|
189
190
|
unfold/templates/unfold/helpers/help_text.html,sha256=o-2_hyruIr_Xt0fo38aGgrpptPJFhddnVMPOVQOYhE4,113
|
@@ -210,7 +211,7 @@ unfold/templates/unfold/helpers/site_dropdown.html,sha256=Zwg5ZGVIEHAI2h-YcWDDBz
|
|
210
211
|
unfold/templates/unfold/helpers/site_icon.html,sha256=qSEpI1RrNlk6ad6HDiBa74vjsYqGgmEgVbfSXdyyMLI,1485
|
211
212
|
unfold/templates/unfold/helpers/site_logo.html,sha256=S_QJoT2qh0xw0ciaKxoT4GJ6QIH5eqgRSC0abbWWkOI,423
|
212
213
|
unfold/templates/unfold/helpers/submit.html,sha256=4Mgf4lx7Atm8GPqD6LTJK3NA9zoSJjs9VPig7sDp8Ao,203
|
213
|
-
unfold/templates/unfold/helpers/tab_action.html,sha256=
|
214
|
+
unfold/templates/unfold/helpers/tab_action.html,sha256=ODm7ws5sbhpE4OvGuQbzynlVwk6AJRreMUra6hh1lxM,3306
|
214
215
|
unfold/templates/unfold/helpers/tab_actions.html,sha256=DMNqY1YyrNrcutOMC3J1neZZjIkPeYShp1i5xZ10nrc,695
|
215
216
|
unfold/templates/unfold/helpers/tab_items.html,sha256=Gi6cjYJ7tJWO6zSXjg8xNHY9ALpYzjQOEORusf_AZfg,3325
|
216
217
|
unfold/templates/unfold/helpers/tab_list.html,sha256=Tqkug9GyoIQ2geVKWrnnuE0bxeTRXj0MSEwwixoOGz4,436
|
@@ -226,7 +227,7 @@ unfold/templates/unfold/widgets/clearable_file_input_small.html,sha256=NNlosUwhz
|
|
226
227
|
unfold/templates/unfold/widgets/date.html,sha256=ih9wj8koTaHb9s1NGUmyN9rHvSAmqCMbti9ONDOIujg,122
|
227
228
|
unfold/templates/unfold/widgets/foreign_key_raw_id.html,sha256=7-JPapXS2Ty0MLXNdZ1jCuydqc6JyDs-8-w9b8TcmVU,1075
|
228
229
|
unfold/templates/unfold/widgets/radio.html,sha256=7Mgc92mMwJdVLjCxoGj5lo76KNaN5dKKktV3vzmbeqA,652
|
229
|
-
unfold/templates/unfold/widgets/radio_option.html,sha256=
|
230
|
+
unfold/templates/unfold/widgets/radio_option.html,sha256=wVg6zIB0O44vwBgQCCphPuCXeh-gaDg6ed-0gcf5kg4,324
|
230
231
|
unfold/templates/unfold/widgets/range.html,sha256=Zhfj2VTusS3nZjOYR7slcjk1JtFK0psZbaSCw6TDY1I,294
|
231
232
|
unfold/templates/unfold/widgets/related_widget_wrapper.html,sha256=4RsFmwlm6De85wsP6W4PvqKosNUPKKNb95RIRh0UUgs,3895
|
232
233
|
unfold/templates/unfold/widgets/split_datetime.html,sha256=2-k9cF1iAeYp3iUT4_9KIIDyZEG3Z25ls34dLan9Z3M,1094
|
@@ -236,13 +237,13 @@ unfold/templates/unfold/widgets/textarea.html,sha256=-ZLDGrtASero7L-J3VvTNq_KjPA
|
|
236
237
|
unfold/templates/unfold/widgets/time.html,sha256=ih9wj8koTaHb9s1NGUmyN9rHvSAmqCMbti9ONDOIujg,122
|
237
238
|
unfold/templates/unfold/widgets/url.html,sha256=IRLgW44VTKN7UrSWeywJwaxQhfG5jhhXuT-KTadKX58,304
|
238
239
|
unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
239
|
-
unfold/templatetags/unfold.py,sha256=
|
240
|
+
unfold/templatetags/unfold.py,sha256=yPSNtaBDiiJh6VNhl3VPDJ-jsX69pbnIf4JolEnw290,16239
|
240
241
|
unfold/templatetags/unfold_list.py,sha256=ayShOYEXcV3o7wKt3t2aFTWvg62Mb-WGlxjYVGgk3a0,14344
|
241
242
|
unfold/typing.py,sha256=i7LM2LiwYTAjT5-OLDUPVn5b9X-DMmHnjlZG2toWwSE,692
|
242
243
|
unfold/utils.py,sha256=SJikRuAuJN0bE9rfzUujZwycTRrzQm14Hk0zB0EwivU,6164
|
243
244
|
unfold/views.py,sha256=FuYnMrlg6SegLUDDN6An__yZj8rchD_iBK8myieYhkA,1492
|
244
|
-
unfold/widgets.py,sha256=
|
245
|
-
django_unfold-0.
|
246
|
-
django_unfold-0.
|
247
|
-
django_unfold-0.
|
248
|
-
django_unfold-0.
|
245
|
+
unfold/widgets.py,sha256=1uyGsw-xA0qspf7Uzic47GVN5xv4L_sVfL-elqlxgm0,20293
|
246
|
+
django_unfold-0.54.0.dist-info/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
|
247
|
+
django_unfold-0.54.0.dist-info/METADATA,sha256=jKgXXRccydhPXLehmUQkHA_xcBzY2XulaY2fB04a_NA,5929
|
248
|
+
django_unfold-0.54.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
249
|
+
django_unfold-0.54.0.dist-info/RECORD,,
|
@@ -2,6 +2,15 @@ from unfold.contrib.filters.admin.autocomplete_filters import (
|
|
2
2
|
AutocompleteSelectFilter,
|
3
3
|
AutocompleteSelectMultipleFilter,
|
4
4
|
)
|
5
|
+
from unfold.contrib.filters.admin.choice_filters import (
|
6
|
+
AllValuesCheckboxFilter,
|
7
|
+
BooleanRadioFilter,
|
8
|
+
CheckboxFilter,
|
9
|
+
ChoicesCheckboxFilter,
|
10
|
+
ChoicesRadioFilter,
|
11
|
+
RadioFilter,
|
12
|
+
RelatedCheckboxFilter,
|
13
|
+
)
|
5
14
|
from unfold.contrib.filters.admin.datetime_filters import (
|
6
15
|
RangeDateFilter,
|
7
16
|
RangeDateTimeFilter,
|
@@ -23,12 +32,20 @@ from unfold.contrib.filters.admin.numeric_filters import (
|
|
23
32
|
from unfold.contrib.filters.admin.text_filters import FieldTextFilter, TextFilter
|
24
33
|
|
25
34
|
__all__ = [
|
35
|
+
"AllValuesCheckboxFilter",
|
36
|
+
"BooleanRadioFilter",
|
37
|
+
"CheckboxFilter",
|
38
|
+
"ChoicesCheckboxFilter",
|
39
|
+
"ChoicesRadioFilter",
|
40
|
+
"MultipleRelatedCheckboxFilter",
|
41
|
+
"RadioFilter",
|
26
42
|
"ChoicesDropdownFilter",
|
27
43
|
"MultipleChoicesDropdownFilter",
|
28
44
|
"DropdownFilter",
|
29
45
|
"RelatedDropdownFilter",
|
30
46
|
"MultipleDropdownFilter",
|
31
47
|
"MultipleRelatedDropdownFilter",
|
48
|
+
"RelatedCheckboxFilter",
|
32
49
|
"FieldTextFilter",
|
33
50
|
"TextFilter",
|
34
51
|
"RangeDateFilter",
|
@@ -0,0 +1,134 @@
|
|
1
|
+
from collections.abc import Generator
|
2
|
+
from typing import Any
|
3
|
+
|
4
|
+
from django.contrib import admin
|
5
|
+
from django.contrib.admin.views.main import ChangeList
|
6
|
+
from django.core.validators import EMPTY_VALUES
|
7
|
+
from django.db.models import QuerySet
|
8
|
+
from django.http import HttpRequest
|
9
|
+
from django.utils.translation import gettext_lazy as _
|
10
|
+
|
11
|
+
from unfold.contrib.filters.admin.mixins import MultiValueMixin, ValueMixin
|
12
|
+
from unfold.contrib.filters.forms import CheckboxForm, HorizontalRadioForm, RadioForm
|
13
|
+
|
14
|
+
|
15
|
+
class RadioFilter(admin.SimpleListFilter):
|
16
|
+
template = "unfold/filters/filters_field.html"
|
17
|
+
form_class = RadioForm
|
18
|
+
all_option = ["", _("All")]
|
19
|
+
|
20
|
+
def choices(self, changelist: ChangeList) -> tuple[dict[str, Any], ...]:
|
21
|
+
if self.all_option:
|
22
|
+
choices = [self.all_option, *self.lookup_choices]
|
23
|
+
else:
|
24
|
+
choices = self.lookup_choices
|
25
|
+
|
26
|
+
return (
|
27
|
+
{
|
28
|
+
"form": self.form_class(
|
29
|
+
label=_(" By %(filter_title)s ") % {"filter_title": self.title},
|
30
|
+
name=self.parameter_name,
|
31
|
+
choices=choices,
|
32
|
+
data={self.parameter_name: self.value()},
|
33
|
+
),
|
34
|
+
},
|
35
|
+
)
|
36
|
+
|
37
|
+
|
38
|
+
class CheckboxFilter(RadioFilter):
|
39
|
+
form_class = CheckboxForm
|
40
|
+
all_option = None
|
41
|
+
|
42
|
+
|
43
|
+
class ChoicesMixin:
|
44
|
+
template = "unfold/filters/filters_field.html"
|
45
|
+
|
46
|
+
def choices(self, changelist: ChangeList) -> Generator[dict[str, Any], None, None]:
|
47
|
+
if self.all_option:
|
48
|
+
choices = [self.all_option, *self.field.flatchoices]
|
49
|
+
else:
|
50
|
+
choices = self.field.flatchoices
|
51
|
+
|
52
|
+
yield {
|
53
|
+
"form": self.form_class(
|
54
|
+
label=_(" By %(filter_title)s ") % {"filter_title": self.title},
|
55
|
+
name=self.lookup_kwarg,
|
56
|
+
choices=choices,
|
57
|
+
data={self.lookup_kwarg: self.value()},
|
58
|
+
),
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
class ChoicesRadioFilter(ValueMixin, ChoicesMixin, admin.ChoicesFieldListFilter):
|
63
|
+
form_class = RadioForm
|
64
|
+
all_option = ["", _("All")]
|
65
|
+
|
66
|
+
|
67
|
+
class ChoicesCheckboxFilter(ValueMixin, ChoicesMixin, admin.ChoicesFieldListFilter):
|
68
|
+
form_class = CheckboxForm
|
69
|
+
all_option = None
|
70
|
+
|
71
|
+
|
72
|
+
class BooleanRadioFilter(ValueMixin, admin.BooleanFieldListFilter):
|
73
|
+
template = "unfold/filters/filters_field.html"
|
74
|
+
form_class = HorizontalRadioForm
|
75
|
+
all_option = ["", _("All")]
|
76
|
+
|
77
|
+
def choices(self, changelist: ChangeList) -> Generator[dict[str, Any], None, None]:
|
78
|
+
choices = [
|
79
|
+
self.all_option,
|
80
|
+
*[
|
81
|
+
("1", _("Yes")),
|
82
|
+
("0", _("No")),
|
83
|
+
],
|
84
|
+
]
|
85
|
+
|
86
|
+
yield {
|
87
|
+
"form": self.form_class(
|
88
|
+
label=_(" By %(filter_title)s ") % {"filter_title": self.title},
|
89
|
+
name=self.lookup_kwarg,
|
90
|
+
choices=choices,
|
91
|
+
data={self.lookup_kwarg: self.value()},
|
92
|
+
),
|
93
|
+
}
|
94
|
+
|
95
|
+
|
96
|
+
class RelatedCheckboxFilter(MultiValueMixin, admin.RelatedFieldListFilter):
|
97
|
+
template = "unfold/filters/filters_field.html"
|
98
|
+
form_class = CheckboxForm
|
99
|
+
|
100
|
+
def queryset(self, request: HttpRequest, queryset: QuerySet) -> QuerySet:
|
101
|
+
if self.value() not in EMPTY_VALUES:
|
102
|
+
return super().queryset(request, queryset)
|
103
|
+
|
104
|
+
return queryset
|
105
|
+
|
106
|
+
def choices(self, changelist: ChangeList) -> Generator[dict[str, Any], None, None]:
|
107
|
+
yield {
|
108
|
+
"form": self.form_class(
|
109
|
+
label=_(" By %(filter_title)s ") % {"filter_title": self.title},
|
110
|
+
name=self.lookup_kwarg,
|
111
|
+
choices=self.lookup_choices,
|
112
|
+
data={self.lookup_kwarg: self.value()},
|
113
|
+
),
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
class AllValuesCheckboxFilter(MultiValueMixin, admin.AllValuesFieldListFilter):
|
118
|
+
template = "unfold/filters/filters_field.html"
|
119
|
+
form_class = CheckboxForm
|
120
|
+
|
121
|
+
def choices(self, changelist: ChangeList) -> Generator[dict[str, Any], None, None]:
|
122
|
+
choices = [[i, val] for i, val in enumerate(self.lookup_choices)]
|
123
|
+
|
124
|
+
if len(choices) == 0:
|
125
|
+
return
|
126
|
+
|
127
|
+
yield {
|
128
|
+
"form": self.form_class(
|
129
|
+
label=_(" By %(filter_title)s ") % {"filter_title": self.title},
|
130
|
+
name=self.lookup_kwarg,
|
131
|
+
choices=[[i, val] for i, val in enumerate(self.lookup_choices)],
|
132
|
+
data={self.lookup_kwarg: self.value()},
|
133
|
+
),
|
134
|
+
}
|
unfold/contrib/filters/forms.py
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
from django import forms
|
2
|
+
from django.contrib.admin.options import HORIZONTAL
|
2
3
|
from django.contrib.admin.widgets import AutocompleteSelect, AutocompleteSelectMultiple
|
3
4
|
from django.db.models import Field as ModelField
|
4
|
-
from django.forms import
|
5
|
+
from django.forms import (
|
6
|
+
ChoiceField,
|
7
|
+
ModelMultipleChoiceField,
|
8
|
+
MultipleChoiceField,
|
9
|
+
)
|
5
10
|
from django.http import HttpRequest
|
6
11
|
from django.utils.translation import gettext_lazy as _
|
7
12
|
|
8
13
|
from unfold.admin import ModelAdmin
|
9
|
-
|
10
|
-
from ...widgets import (
|
14
|
+
from unfold.widgets import (
|
11
15
|
INPUT_CLASSES,
|
16
|
+
UnfoldAdminCheckboxSelectMultiple,
|
17
|
+
UnfoldAdminRadioSelectWidget,
|
12
18
|
UnfoldAdminSelectMultipleWidget,
|
13
19
|
UnfoldAdminSelectWidget,
|
14
20
|
UnfoldAdminSplitDateTimeVerticalWidget,
|
@@ -71,6 +77,38 @@ class AutocompleteDropdownForm(forms.Form):
|
|
71
77
|
}
|
72
78
|
|
73
79
|
|
80
|
+
class CheckboxForm(forms.Form):
|
81
|
+
field = MultipleChoiceField
|
82
|
+
widget = UnfoldAdminCheckboxSelectMultiple
|
83
|
+
|
84
|
+
def __init__(
|
85
|
+
self,
|
86
|
+
name: str,
|
87
|
+
label: str,
|
88
|
+
choices: tuple,
|
89
|
+
*args,
|
90
|
+
**kwargs,
|
91
|
+
) -> None:
|
92
|
+
super().__init__(*args, **kwargs)
|
93
|
+
|
94
|
+
self.fields[name] = self.field(
|
95
|
+
label=label,
|
96
|
+
required=False,
|
97
|
+
choices=choices,
|
98
|
+
widget=self.widget,
|
99
|
+
)
|
100
|
+
|
101
|
+
|
102
|
+
class RadioForm(CheckboxForm):
|
103
|
+
field = ChoiceField
|
104
|
+
widget = UnfoldAdminRadioSelectWidget
|
105
|
+
|
106
|
+
|
107
|
+
class HorizontalRadioForm(RadioForm):
|
108
|
+
horizontal = True
|
109
|
+
widget = UnfoldAdminRadioSelectWidget(radio_style=HORIZONTAL)
|
110
|
+
|
111
|
+
|
74
112
|
class DropdownForm(forms.Form):
|
75
113
|
widget = UnfoldAdminSelectWidget(
|
76
114
|
attrs={
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="flex flex-col">
|
5
5
|
<h3 class="font-semibold mb-2 text-font-important-light dark:text-font-important-dark">{% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}</h3>
|
6
6
|
|
7
|
-
<div class="flex flex-col space-y-
|
7
|
+
<div class="flex flex-col space-y-2">
|
8
8
|
{% for field in choice.form %}
|
9
9
|
<div class="flex flex-row flex-wrap group relative{% if field.errors %} errors{% endif %}">
|
10
10
|
{{ field }}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="flex flex-col">
|
5
5
|
<h3 class="font-semibold mb-2 text-font-important-light dark:text-font-important-dark">{% blocktrans with filter_title=title %}By {{ filter_title }}{% endblocktrans %}</h3>
|
6
6
|
|
7
|
-
<div class="flex flex-col space-y-
|
7
|
+
<div class="flex flex-col space-y-2">
|
8
8
|
{% for field in choice.form %}
|
9
9
|
<div class="flex flex-row flex-wrap group relative{% if field.errors %} errors{% endif %}">
|
10
10
|
{{ field }}
|
@@ -96,12 +96,23 @@
|
|
96
96
|
.removeClass(options.emptyCssClass)
|
97
97
|
.addClass(options.formCssClass)
|
98
98
|
.attr("id", options.prefix + "-" + nextIndex);
|
99
|
+
|
99
100
|
addInlineDeleteButton(row);
|
100
101
|
row.find("*").each(function () {
|
101
102
|
updateElementIndex(this, options.prefix, totalForms.val());
|
102
103
|
});
|
104
|
+
|
103
105
|
// Insert the new form when it has been fully edited.
|
104
|
-
|
106
|
+
// !CHANGED from original
|
107
|
+
if ($(template).parent().is("tbody")) {
|
108
|
+
row
|
109
|
+
.wrap('<tbody class="template"></tbody>')
|
110
|
+
.parent()
|
111
|
+
.insertBefore($(template).parent());
|
112
|
+
} else {
|
113
|
+
row.insertBefore($(template));
|
114
|
+
}
|
115
|
+
|
105
116
|
// Update number of total forms.
|
106
117
|
$(totalForms).val(parseInt(totalForms.val(), 10) + 1);
|
107
118
|
nextIndex += 1;
|
@@ -183,7 +194,13 @@
|
|
183
194
|
if (prevRow.length && prevRow.hasClass("row-form-errors")) {
|
184
195
|
prevRow.remove();
|
185
196
|
}
|
186
|
-
|
197
|
+
|
198
|
+
// !CHANGED from original
|
199
|
+
if (deleteButton.parent().parent().parent().parent().is("tbody")) {
|
200
|
+
row.parent().remove();
|
201
|
+
} else {
|
202
|
+
row.remove();
|
203
|
+
}
|
187
204
|
nextIndex -= 1;
|
188
205
|
// Pass the deleted form to the post-delete callback, if provided.
|
189
206
|
if (options.removed) {
|
@@ -245,8 +262,11 @@
|
|
245
262
|
}
|
246
263
|
|
247
264
|
// Create the delete buttons for all unsaved inlines:
|
265
|
+
// !CHANGED from original, added parent() and used find() instead of filter()
|
248
266
|
$this
|
249
|
-
.
|
267
|
+
.parent()
|
268
|
+
.parent()
|
269
|
+
.find(
|
250
270
|
"." +
|
251
271
|
options.formCssClass +
|
252
272
|
":not(.has_original):not(." +
|