django-unfold 0.41.0__py3-none-any.whl → 0.43.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.41.0.dist-info → django_unfold-0.43.0.dist-info}/METADATA +1 -1
- {django_unfold-0.41.0.dist-info → django_unfold-0.43.0.dist-info}/RECORD +63 -55
- unfold/admin.py +8 -1
- unfold/components.py +47 -0
- unfold/contrib/filters/admin.py +23 -33
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +1 -1
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +1 -1
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/export.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import_validation.html +26 -21
- unfold/contrib/import_export/templates/admin/import_export/resource_fields_list.html +5 -3
- unfold/contrib/simple_history/templates/simple_history/object_history_form.html +1 -1
- unfold/contrib/simple_history/templates/simple_history/submit_line.html +1 -1
- unfold/settings.py +1 -0
- unfold/sites.py +25 -5
- unfold/static/unfold/css/styles.css +1 -1
- unfold/static/unfold/js/app.js +21 -15
- unfold/styles.css +14 -1
- unfold/templates/admin/base.html +3 -3
- unfold/templates/admin/change_form.html +9 -1
- unfold/templates/admin/change_list.html +1 -1
- unfold/templates/admin/date_hierarchy.html +5 -5
- unfold/templates/admin/delete_confirmation.html +1 -1
- unfold/templates/admin/delete_selected_confirmation.html +1 -1
- unfold/templates/admin/edit_inline/stacked.html +8 -2
- unfold/templates/admin/edit_inline/tabular.html +8 -2
- unfold/templates/admin/nav_sidebar.html +1 -10
- unfold/templates/admin/object_history.html +1 -1
- unfold/templates/admin/submit_line.html +2 -2
- unfold/templates/unfold/change_list_filter.html +5 -13
- unfold/templates/unfold/components/card.html +1 -1
- unfold/templates/unfold/components/chart/cohort.html +59 -0
- unfold/templates/unfold/components/navigation.html +1 -1
- unfold/templates/unfold/components/tracker.html +5 -0
- unfold/templates/unfold/helpers/account_links.html +1 -1
- unfold/templates/unfold/helpers/actions_row.html +9 -7
- unfold/templates/unfold/helpers/field_readonly.html +1 -1
- unfold/templates/unfold/helpers/form_label.html +1 -1
- unfold/templates/unfold/helpers/header.html +1 -1
- unfold/templates/unfold/helpers/label.html +1 -1
- unfold/templates/unfold/helpers/language_switch.html +27 -0
- unfold/templates/unfold/helpers/messages/debug.html +3 -0
- unfold/templates/unfold/helpers/messages/error.html +5 -3
- unfold/templates/unfold/helpers/messages/info.html +2 -2
- unfold/templates/unfold/helpers/messages/success.html +3 -0
- unfold/templates/unfold/helpers/messages/warning.html +3 -0
- unfold/templates/unfold/helpers/messages.html +13 -14
- unfold/templates/unfold/helpers/tab_list.html +3 -3
- unfold/templates/unfold/helpers/theme_switch.html +1 -1
- unfold/templates/unfold/helpers/userlinks.html +4 -0
- unfold/templates/unfold/helpers/welcomemsg.html +9 -1
- unfold/templates/unfold/layouts/base_simple.html +1 -1
- unfold/templates/unfold/layouts/skeleton.html +1 -1
- unfold/templates/unfold/templatetags/preserve_changelist_filters.html +3 -0
- unfold/templates/unfold/widgets/clearable_file_input.html +1 -1
- unfold/templates/unfold/widgets/clearable_file_input_small.html +1 -1
- unfold/templates/unfold/widgets/split_datetime_vertical.html +1 -1
- unfold/templatetags/unfold.py +55 -9
- unfold/utils.py +17 -0
- unfold/widgets.py +6 -2
- {django_unfold-0.41.0.dist-info → django_unfold-0.43.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.41.0.dist-info → django_unfold-0.43.0.dist-info}/WHEEL +0 -0
@@ -1,10 +1,11 @@
|
|
1
1
|
unfold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
unfold/admin.py,sha256=
|
2
|
+
unfold/admin.py,sha256=mipNoMPKxrKv3dhzpWqWJgkE5U6Ve0O4EKQWBI6pvws,20060
|
3
3
|
unfold/apps.py,sha256=SlBXPYrUd2uXn67qFbRvbXSUk3XFWrF4-5WELgDCvho,381
|
4
4
|
unfold/checks.py,sha256=Smgji9w19hnYjJElJ_FJnnyTEAE-E-OUB6otHu7lasY,1670
|
5
|
+
unfold/components.py,sha256=OKYEpAeawhqSUWOy0VB8EZTsPRzV19oOjSrWckLLeHI,1295
|
5
6
|
unfold/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
7
|
unfold/contrib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
unfold/contrib/filters/admin.py,sha256=
|
8
|
+
unfold/contrib/filters/admin.py,sha256=EXg7eQSVKxobhV0l7Uk4h4zSiEfUB5sJs0qLvfugqRY,21022
|
8
9
|
unfold/contrib/filters/apps.py,sha256=wEySJy0gMLzFLb9XNKE-RexiO05X7NaQ5QmxZyziJ_k,136
|
9
10
|
unfold/contrib/filters/forms.py,sha256=p1vfCdhBVEGmvHG0EAtv12B1Ssm2xtXuImL4R0bHOV0,5748
|
10
11
|
unfold/contrib/filters/static/unfold/filters/css/nouislider.min.css,sha256=rddL_jOGGVEY6wR-aw0VYovAfz5fPeAIsulrlSNb1hc,4221
|
@@ -31,9 +32,9 @@ unfold/contrib/guardian/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
31
32
|
unfold/contrib/guardian/apps.py,sha256=ObJqwh4vHxkD4XfduP5IQAiYiWZxsXUOUqF1_R1GsRI,136
|
32
33
|
unfold/contrib/guardian/templates/admin/guardian/model/change_form.html,sha256=FSJc4MYYWyzZAy8Ay0b7Ov-cUo-oELHOM5fQehM54Lg,403
|
33
34
|
unfold/contrib/guardian/templates/admin/guardian/model/field.html,sha256=V9ZgmYiIQAFy3GC464y0iBOHm3SDvEEymbuhT3S0qKU,296
|
34
|
-
unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html,sha256=
|
35
|
-
unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html,sha256=
|
36
|
-
unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html,sha256=
|
35
|
+
unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html,sha256=4C7EdB6ueuwk6EfwLURsRz8rb2DuxuB4lPxL09ZAJLg,1435
|
36
|
+
unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html,sha256=WXfRUGPrj4d7OgKFPVMOXHFTeotpdsuaO3P7Uzt8E2A,2331
|
37
|
+
unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html,sha256=vesY2_TqkTPEq4xncGfFHP9mFcAcN1oMJ990b1KUTuU,2329
|
37
38
|
unfold/contrib/guardian/templates/unfold/guardian/group_form.html,sha256=3W-CCW8eb_VAzjLHtbNYBzlxFP_wofQFl9EMO-E4ivQ,3925
|
38
39
|
unfold/contrib/guardian/templates/unfold/guardian/user_form.html,sha256=ZGcndXOn-MeFW3b2bNUr5-PFS85HxLhDoPeR7AIKQ4Q,3914
|
39
40
|
unfold/contrib/import_export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -45,14 +46,14 @@ unfold/contrib/import_export/templates/admin/import_export/change_list_export.ht
|
|
45
46
|
unfold/contrib/import_export/templates/admin/import_export/change_list_export_item.html,sha256=pTDeqPKOlCPKH2dxMIfPnWuc2wVDzB7AzL73WbxSnRY,257
|
46
47
|
unfold/contrib/import_export/templates/admin/import_export/change_list_import_export.html,sha256=JdKd6P2Ot9Ou4yg4CywTauuE1UiTz_mRvDwlx3vj3LI,229
|
47
48
|
unfold/contrib/import_export/templates/admin/import_export/change_list_import_item.html,sha256=XUuRxnsx9YQbKvW-E_JGl_ha7kpTSGSoRefOTTizuX0,233
|
48
|
-
unfold/contrib/import_export/templates/admin/import_export/export.html,sha256=
|
49
|
-
unfold/contrib/import_export/templates/admin/import_export/import.html,sha256=
|
49
|
+
unfold/contrib/import_export/templates/admin/import_export/export.html,sha256=6oI9pzY7sl6AG8ObvI9hY86gBH4DRnj6eWvp9Uw54UA,3456
|
50
|
+
unfold/contrib/import_export/templates/admin/import_export/import.html,sha256=i4LjZOLDnDKHzjHJt45vqFLVC_aBhV1A6QJZuR7CrgI,2134
|
50
51
|
unfold/contrib/import_export/templates/admin/import_export/import_confirm.html,sha256=9DpqVW2TcrC8UrAawBP-6KIzKf0bZDNhpYIWduGTnVc,869
|
51
52
|
unfold/contrib/import_export/templates/admin/import_export/import_errors.html,sha256=edsP56v1xeCezliXTxPIVo8mvv8rdVwh8yz0LeP5Zjk,1430
|
52
53
|
unfold/contrib/import_export/templates/admin/import_export/import_form.html,sha256=mMuMTAbgMbJ1IyCQPBkzmob4m5lJmZ69_QSo3GvvSiY,990
|
53
54
|
unfold/contrib/import_export/templates/admin/import_export/import_preview.html,sha256=UZG5ep4BRbq3K9g3Yv0sNJdVRYmEi4luHi51IHNGNU8,2263
|
54
|
-
unfold/contrib/import_export/templates/admin/import_export/import_validation.html,sha256=
|
55
|
-
unfold/contrib/import_export/templates/admin/import_export/resource_fields_list.html,sha256=
|
55
|
+
unfold/contrib/import_export/templates/admin/import_export/import_validation.html,sha256=3FKreXso0U3Jvz8LKGiKpLXAD2kqwH9xf3KHPZ3ALMs,5065
|
56
|
+
unfold/contrib/import_export/templates/admin/import_export/resource_fields_list.html,sha256=Bc6uD8aHA5YYbZgLAPpGUckFjnxn9uq19YuKKFxTj4Y,887
|
56
57
|
unfold/contrib/inlines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
58
|
unfold/contrib/inlines/admin.py,sha256=LloGe9KaY0hb9LX0jICpWi01DcdnSCXRfpAdY9VxkiY,5929
|
58
59
|
unfold/contrib/inlines/apps.py,sha256=Z9JBnzywq-DanZbD56fG0ndBfLXbojzkjVBleqoOBSU,136
|
@@ -61,20 +62,20 @@ unfold/contrib/inlines/forms.py,sha256=s49xrIkQTbvSMsrP4DydXWkpP1v8NCUmQw_Bcoqf0
|
|
61
62
|
unfold/contrib/simple_history/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
63
|
unfold/contrib/simple_history/apps.py,sha256=eF_KVYb60CAnGgWk2Z1YKYGfgA3TJBMr229qI7e2pgU,153
|
63
64
|
unfold/contrib/simple_history/templates/simple_history/object_history.html,sha256=vX8bIubM54WtpnCCz6Ip2c1ryisaCveUHAakRMj_qE8,751
|
64
|
-
unfold/contrib/simple_history/templates/simple_history/object_history_form.html,sha256=
|
65
|
+
unfold/contrib/simple_history/templates/simple_history/object_history_form.html,sha256=Mc22IgdVTg0W2JsiI3R66wN3lPxOWwpuLcbLQYDQ7OI,2299
|
65
66
|
unfold/contrib/simple_history/templates/simple_history/object_history_list.html,sha256=MvCaPwFwNlSr-kNSJIxBdKhWQmG4OgNJTDPWB-FWUEk,6858
|
66
|
-
unfold/contrib/simple_history/templates/simple_history/submit_line.html,sha256=
|
67
|
+
unfold/contrib/simple_history/templates/simple_history/submit_line.html,sha256=UtC4DMpnIK3slH8txxNA5igBhFzjgFXErNxG5VWqR_k,1711
|
67
68
|
unfold/dataclasses.py,sha256=4PAWLVlUhyGMq1Mwai7afCgrRO0Inulw0opFUKVEOBk,483
|
68
69
|
unfold/decorators.py,sha256=jyjE2sunazp8gK1QIsNRJGEEDwO7RDKWDKnOI3GDWZE,3338
|
69
70
|
unfold/exceptions.py,sha256=gcCj1ox61E137bk_0Cqy4YC3SttdPgB-fiJUqpmyHSE,43
|
70
71
|
unfold/fields.py,sha256=yhtpDfqycpOxqdQlbncCg9qhELxGk3AtXizkZyzzH0g,7410
|
71
72
|
unfold/forms.py,sha256=raPZVYuZ1UQwo5qv8M6KDdprfCvRgjFnYfLdkmBRojI,4118
|
72
|
-
unfold/settings.py,sha256=
|
73
|
-
unfold/sites.py,sha256=
|
73
|
+
unfold/settings.py,sha256=71ygidxvTum58iYRk8Tcujgo09nZJRjNRUQOWdFm-5s,2140
|
74
|
+
unfold/sites.py,sha256=GTClpbOENkPRallC2IrskwtgbqrbuWE5Pr5wsCoB9Us,14566
|
74
75
|
unfold/static/admin/js/admin/RelatedObjectLookups.js,sha256=alI0-yq7YPDJJJn-yg1ce79-Cv88yQDUrfaGqFZnsaY,9048
|
75
76
|
unfold/static/admin/js/inlines.js,sha256=-WGZO7BO07zNGAvb5ZdnR4PjqqhU29gyVMKsBn-PBUw,14577
|
76
77
|
unfold/static/unfold/css/simplebar.css,sha256=5LLaEM11pKi6JFCOLt4XKuZxTpT9rpdq_tNlaQytFlU,4647
|
77
|
-
unfold/static/unfold/css/styles.css,sha256=
|
78
|
+
unfold/static/unfold/css/styles.css,sha256=jRv4QVgYBUhJFFjOD_0ujpoQnSmIgE8p8umy1pViX7k,148327
|
78
79
|
unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=O88EyjAeRPE_QEyKBKpK5wf2epUOEu8wwjj5bnhCZqE,46552
|
79
80
|
unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=O88EyjAeRPE_QEyKBKpK5wf2epUOEu8wwjj5bnhCZqE,46552
|
80
81
|
unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=O88EyjAeRPE_QEyKBKpK5wf2epUOEu8wwjj5bnhCZqE,46552
|
@@ -86,59 +87,61 @@ unfold/static/unfold/js/alpine.anchor.js,sha256=2Jg9aUq749pjFynzr_H1NK3lf-nXrbHM
|
|
86
87
|
unfold/static/unfold/js/alpine.js,sha256=NY2a-7GrW--i9IBhowd25bzXcH9BCmBrqYX5i8OxwDQ,44659
|
87
88
|
unfold/static/unfold/js/alpine.persist.js,sha256=jFBwr6faTqqhp3sVi4_VTxJ0FpaF9YGZN1ZGLl_5QYM,837
|
88
89
|
unfold/static/unfold/js/alpine.sort.js,sha256=q6LxgConwu8M8R03mZSBcsKwJv6fF7oomP8sqLxVQ0w,37891
|
89
|
-
unfold/static/unfold/js/app.js,sha256=
|
90
|
+
unfold/static/unfold/js/app.js,sha256=BblUrP4UxZWGRcjHErfixPmC2LfYBA4dpGl2oXb-xDE,8216
|
90
91
|
unfold/static/unfold/js/chart.js,sha256=22W6cFERR-CElMOKRgMMicueMVP0Vf7FBEBYH8Z8tCk,200633
|
91
92
|
unfold/static/unfold/js/htmx.js,sha256=XOLqvnZiyEx46EW9vaJTBUaaWg8CGVVfXJkVsUmJbpI,42820
|
92
93
|
unfold/static/unfold/js/select2.init.js,sha256=siSDCwzy2PsOwA0Kj26JA_ELBtZlS70O8D8f1qTMmqg,291
|
93
94
|
unfold/static/unfold/js/simplebar.js,sha256=t-uG1FAD6ZoiMeN--wac0XRS7SxoDVG6zvRnGuEp7X8,27176
|
94
|
-
unfold/styles.css,sha256=
|
95
|
+
unfold/styles.css,sha256=sYekwcivglCDa8zVo21pCY-3XyiyXcCHMK6AVGc-eHs,18531
|
95
96
|
unfold/templates/admin/actions.html,sha256=8GqELAxzywGyfQJiQeuhGIQUakdK_WeneILY06C7mEo,2746
|
96
97
|
unfold/templates/admin/app_index.html,sha256=fphodUAgaL7X4pOz-QxiWOKnESEs8wRqPoShSF6iBaU,1345
|
97
98
|
unfold/templates/admin/app_list.html,sha256=avKk-Dj_4GY_izBKWsb_yNHxUyVpdRbDBZuoxlIEdN0,2817
|
98
99
|
unfold/templates/admin/auth/user/add_form.html,sha256=L0ylU7BLEIoZc3nS4Rq6DA0H94HQ3aXFr-iwK0vp2Bs,482
|
99
100
|
unfold/templates/admin/auth/user/change_password.html,sha256=q7RMscF4thZisdt5CrZLugk-MWDr8DgQ-3KXDv2QlGk,2902
|
100
|
-
unfold/templates/admin/base.html,sha256=
|
101
|
+
unfold/templates/admin/base.html,sha256=9iTxs17eoeBhdUbnvq_fpq_gKmO9_D9XMnAuRdDESsE,2364
|
101
102
|
unfold/templates/admin/base_site.html,sha256=FM8OOaXsQqJlYapeJvBznXCOt7poMiWrweTWcsMHzeI,365
|
102
|
-
unfold/templates/admin/change_form.html,sha256
|
103
|
+
unfold/templates/admin/change_form.html,sha256=LfeAeLYpJvNhOMJWQFeb9oSrAznlB4pnFrqTVMCIy4o,5340
|
103
104
|
unfold/templates/admin/change_form_object_tools.html,sha256=eyeH-i2HgEM0Yi-OJA2D1VnKJyC19A_my1IDGxxoP8Y,593
|
104
|
-
unfold/templates/admin/change_list.html,sha256=
|
105
|
+
unfold/templates/admin/change_list.html,sha256=qpfVyQC6S-ypJZeYqPGBDvksw182d2fUH9KDmbTr9SI,5634
|
105
106
|
unfold/templates/admin/change_list_object_tools.html,sha256=cmMiT2nT20Ph5yfpj9aHPr76Z-JP4aSXp0o-Rnad28s,147
|
106
107
|
unfold/templates/admin/change_list_results.html,sha256=Nb-NbQYalqGJ9TRW4B1RZrS2ePhbyWtXi_K-tBn1DQs,5502
|
107
|
-
unfold/templates/admin/date_hierarchy.html,sha256=
|
108
|
-
unfold/templates/admin/delete_confirmation.html,sha256=
|
109
|
-
unfold/templates/admin/delete_selected_confirmation.html,sha256=
|
110
|
-
unfold/templates/admin/edit_inline/stacked.html,sha256=
|
111
|
-
unfold/templates/admin/edit_inline/tabular.html,sha256=
|
108
|
+
unfold/templates/admin/date_hierarchy.html,sha256=yMiZ3h2Sfl1JxoOHu9SmOoGvvboGOEFq20L8bPjuy2s,1411
|
109
|
+
unfold/templates/admin/delete_confirmation.html,sha256=atSK7BJyqisCNJa_xYL9FItaMkT16WpQp7bg6v51ay0,4628
|
110
|
+
unfold/templates/admin/delete_selected_confirmation.html,sha256=cVmF3XbxZbuHgUzhteFGC_vrz5goi6h5cy_XbP7twhw,4397
|
111
|
+
unfold/templates/admin/edit_inline/stacked.html,sha256=JKWBS51A_af52mgUedPc4dg5T0Gu00ehLDbUWLn866E,7733
|
112
|
+
unfold/templates/admin/edit_inline/tabular.html,sha256=ytdjFxOjBWAPokqtmfbjsNVXoFYSK3jZIRxnsZGuaGQ,15141
|
112
113
|
unfold/templates/admin/filter.html,sha256=wgYuP_ZmTofljsavLe4t8djAZnXRfEmz5U40SI-2Hjc,1640
|
113
114
|
unfold/templates/admin/includes/fieldset.html,sha256=eyo5icIIrihKBLT7k3FCgoVhK55Lb78eIp7tIUNXLvU,975
|
114
115
|
unfold/templates/admin/includes/object_delete_summary.html,sha256=w_lPVnBrng0oqvFy6rzvr8c5bzdU8GpqvYUAvaXza0c,444
|
115
116
|
unfold/templates/admin/index.html,sha256=pkGdKWdD3zzOvkRdELvdb15sleSpfl4eHPA14PAh7z0,684
|
116
117
|
unfold/templates/admin/login.html,sha256=Xw50tZZxESEwz9YOcV1CSPeyyI2H1l0q4x4zBrC4dps,4170
|
117
|
-
unfold/templates/admin/nav_sidebar.html,sha256=
|
118
|
-
unfold/templates/admin/object_history.html,sha256=
|
118
|
+
unfold/templates/admin/nav_sidebar.html,sha256=m5xcM5k-wfZ_hbwKq9dXpjfCW-3A0ahVEXr3y64W1lQ,618
|
119
|
+
unfold/templates/admin/object_history.html,sha256=0NvY31OEO0g8JHEYVzUUhg95nJxOto2J0I_K4sMf6wc,4825
|
119
120
|
unfold/templates/admin/pagination.html,sha256=KrwOM6gRizfpTMP59TESQaNGcQzkga2k02opl_7BxLo,1130
|
120
121
|
unfold/templates/admin/search_form.html,sha256=NNTJ38yABrSBOet3ivkbzciYHd_I_mGHlgRvLHSL5ig,1219
|
121
|
-
unfold/templates/admin/submit_line.html,sha256=
|
122
|
+
unfold/templates/admin/submit_line.html,sha256=ij1DDrmBRPM2DL5CnC4Aby0v55WgtsdZzrd8nUukUoE,4165
|
122
123
|
unfold/templates/auth/widgets/read_only_password_hash.html,sha256=UK36u2lYyiY_oSWuzlH_54Kjc1RzgO3Y1VaqJPyXk_Y,754
|
123
124
|
unfold/templates/registration/logged_out.html,sha256=cg4YjMbVtuMdOJD3hkkJZntv0G8gnzQYkDpZJVRNM2g,995
|
124
125
|
unfold/templates/registration/password_change_done.html,sha256=MjwUFjMoM26GcQ4sduh5afNzt11HbOVFEVb4nZ6bdD8,1080
|
125
126
|
unfold/templates/registration/password_change_form.html,sha256=YKIjlijh9wTFkCO-KWgNBxZdgx4RzXUWr4l2zO1ZNJA,2235
|
126
|
-
unfold/templates/unfold/change_list_filter.html,sha256=
|
127
|
+
unfold/templates/unfold/change_list_filter.html,sha256=owa9BIj19AQJZ1hmdM6mkA4BMvkbDRDQUrf-pvDW-O0,3259
|
127
128
|
unfold/templates/unfold/components/button.html,sha256=E9B5Y0ZzUrFmw50tK8Fi8-V0V6-ONbWcBMuyoxaDjSI,476
|
128
|
-
unfold/templates/unfold/components/card.html,sha256=
|
129
|
+
unfold/templates/unfold/components/card.html,sha256=UlBRe4flU_GQkMyFibS50YeW8zu9VUaHMlh-xmrI61s,1118
|
129
130
|
unfold/templates/unfold/components/chart/bar.html,sha256=nDdDCUXvFd793OpNgNPQo0vBmvYngMsQyPHVTf1vfOw,297
|
131
|
+
unfold/templates/unfold/components/chart/cohort.html,sha256=4vywJdz5_ZXlPklmOChp33lq96C1qJxtE0P-IyeVUk4,2355
|
130
132
|
unfold/templates/unfold/components/chart/line.html,sha256=DHaZUFTlCs5cX7ioYdTzoN4ITHWNcEoNSUp7v3hlo_E,298
|
131
133
|
unfold/templates/unfold/components/container.html,sha256=WBk1rGHnTsObi3pJCpL3dfFAUQ2abDmokU0Lee7R9CI,83
|
132
134
|
unfold/templates/unfold/components/flex.html,sha256=_hBsQLJ6-7MfEfXNp5Wy-ykNtPMnnNg_io2IMGegn3s,134
|
133
135
|
unfold/templates/unfold/components/icon.html,sha256=Qlhcf41FOwNVJ-nvA0RJ_Dn6JW6PUFXO6tOR3Xtf6e8,99
|
134
|
-
unfold/templates/unfold/components/navigation.html,sha256=
|
136
|
+
unfold/templates/unfold/components/navigation.html,sha256=5YFple8oIVZZcr22TOZY56_Xk5M-MvKF4U6krwMOKD0,887
|
135
137
|
unfold/templates/unfold/components/progress.html,sha256=BnH2uC_ZL5ITvMjHiHoM0gjtbRTLNU1-tFcfCuJO0BE,808
|
136
138
|
unfold/templates/unfold/components/separator.html,sha256=TlKnvg1h3diDvm9A_FWc2atflAxb4e3HtnxYTxR75SU,168
|
137
139
|
unfold/templates/unfold/components/table.html,sha256=iC7mhLlPLRgCaV0sVjEkxIR7A4NLV2-rSHqEbmwpaHw,2028
|
138
140
|
unfold/templates/unfold/components/text.html,sha256=-GjxvdiaBQIaNfPSzT6SSIwnc3R27FkSDQMoF3FDPso,102
|
139
141
|
unfold/templates/unfold/components/title.html,sha256=aMYSO30ybFYqPnqwlJVh2uNmcgnVrRycZkHTjJTjpX8,171
|
140
|
-
unfold/templates/unfold/
|
141
|
-
unfold/templates/unfold/helpers/
|
142
|
+
unfold/templates/unfold/components/tracker.html,sha256=9DLc_vjiAVgdcp1v_sheJ3YZl8BXOZ-o6YBXlNqDfF0,284
|
143
|
+
unfold/templates/unfold/helpers/account_links.html,sha256=QRcsosWnq3cHH6UMmxGAFZTomOWubbwfn4NymFAQ-XA,1863
|
144
|
+
unfold/templates/unfold/helpers/actions_row.html,sha256=1cZ6eI-ljhuaRIeb8AQkELCwuCchom9uwOITdkhKc-4,1931
|
142
145
|
unfold/templates/unfold/helpers/add_link.html,sha256=CUFZ3quvp1JMAPmTkFRjpUXSy9GVXnIWNcRzv_gpq1A,810
|
143
146
|
unfold/templates/unfold/helpers/app_list.html,sha256=zeMeiSK-vlxrgP-jDkIN1k1mYCog033ybBSxw5POWvs,5516
|
144
147
|
unfold/templates/unfold/helpers/app_list_default.html,sha256=T8xXI0LsEZCyttxXZGomGMkqEd8Wxj61RCYQ4YDxlHE,3908
|
@@ -149,20 +152,24 @@ unfold/templates/unfold/helpers/delete_submit_line.html,sha256=4aijRBjLFqVDZpUxU
|
|
149
152
|
unfold/templates/unfold/helpers/display_header.html,sha256=HFuiSsgjrrfUFd8uwsxNiHbe4Mpt-9BeaUShgwbGGbo,1701
|
150
153
|
unfold/templates/unfold/helpers/display_label.html,sha256=LS9DWzYjHkYLV27sZDwyXlg2sLJ0AlId9FbjnXpsbfg,317
|
151
154
|
unfold/templates/unfold/helpers/field.html,sha256=Ds-zUHkdyxamfUCVNhxvtM0XoJg9OCA0QcsLbLWv4oo,882
|
152
|
-
unfold/templates/unfold/helpers/field_readonly.html,sha256=
|
155
|
+
unfold/templates/unfold/helpers/field_readonly.html,sha256=QbX4jWVFCVvW6ZxOTxcGcarLUtUoCOH5KTIBwAodRzo,237
|
153
156
|
unfold/templates/unfold/helpers/field_readonly_value.html,sha256=E6eIJbO-Y2TWmmzpffC5F3l7KYZ8G-QxstUIHTVRjKg,461
|
154
157
|
unfold/templates/unfold/helpers/fieldset_row.html,sha256=Eh2OO1WjqSs-wkGIo-d-ZfAE5dlp_n6lDd7uuX26_Pc,4374
|
155
158
|
unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=GjFPlQgL-qv8bbxje5Zm1XL9v2_qFh-U3wcVvAOO5sE,1529
|
156
159
|
unfold/templates/unfold/helpers/form_errors.html,sha256=EwerIJptSCWXvtAJ1IZKfEn98qlShBIGavsTThbklAs,266
|
157
|
-
unfold/templates/unfold/helpers/form_label.html,sha256=
|
158
|
-
unfold/templates/unfold/helpers/header.html,sha256
|
160
|
+
unfold/templates/unfold/helpers/form_label.html,sha256=BRX3DxVQfEvcmpFcRuhl4v_icMCCd5O_zmYm6MGLtts,327
|
161
|
+
unfold/templates/unfold/helpers/header.html,sha256=Cl2rNccSi7HCf-Sl3g2YFe9DVVv6_Kw5GiV3Z0qHoaU,1050
|
159
162
|
unfold/templates/unfold/helpers/help_text.html,sha256=o-2_hyruIr_Xt0fo38aGgrpptPJFhddnVMPOVQOYhE4,113
|
160
163
|
unfold/templates/unfold/helpers/history.html,sha256=tfpOWNDzo2k7orcb7avfFBWVFe8Z5yVxtMkshD2C42E,1927
|
161
|
-
unfold/templates/unfold/helpers/label.html,sha256=
|
162
|
-
unfold/templates/unfold/helpers/
|
164
|
+
unfold/templates/unfold/helpers/label.html,sha256=ye13yN-yY_A9Oe_9CEUJSwCgc7wWwgNdSc1zaeUtcJ8,900
|
165
|
+
unfold/templates/unfold/helpers/language_switch.html,sha256=1B53ken8CmwOcaPzjJ7D_EP2B_ToTaMJxQLdKk47uSQ,1463
|
166
|
+
unfold/templates/unfold/helpers/messages/debug.html,sha256=kl-_k6gZg2o2b1BaIjJt3Li9gJ5xMpXngTrN_YsLdOE,144
|
167
|
+
unfold/templates/unfold/helpers/messages/error.html,sha256=j6YsIJKltSHV7ZqXJgLxJI9hzjmDSchary0OX7BQ5M8,595
|
163
168
|
unfold/templates/unfold/helpers/messages/errornote.html,sha256=5ChxoVYkF4jI-cw72gVHh0CRxDnG9ME_U6UQOArax2k,404
|
164
|
-
unfold/templates/unfold/helpers/messages/info.html,sha256=
|
165
|
-
unfold/templates/unfold/helpers/messages.html,sha256=
|
169
|
+
unfold/templates/unfold/helpers/messages/info.html,sha256=SwAZPKKa7rF4hPxwsmakpF_QYkfy_jsCt5ODJbNC2Pk,144
|
170
|
+
unfold/templates/unfold/helpers/messages/success.html,sha256=eJcvQtV1nLpS0h3cXzclM_W9dCmDGwHUiDIBlXPVlC4,148
|
171
|
+
unfold/templates/unfold/helpers/messages/warning.html,sha256=NEsNP7HLU3bdEOKetq0co9qyDsOK1_CAIygXB2Rerxk,152
|
172
|
+
unfold/templates/unfold/helpers/messages.html,sha256=I9RIKfi4T65AG16-2s0C32RwbFkn0qLhdSqDfXpSbyE,915
|
166
173
|
unfold/templates/unfold/helpers/navigation.html,sha256=3-vUm7vrxfCk6y1CUKGyiYeQaYjV0qNJSO3AAYKBun4,1252
|
167
174
|
unfold/templates/unfold/helpers/pagination_current_item.html,sha256=4cZ2KLVcP0Y7xuGyXgexDQ07r94cgM5Gnmtv11dkRPQ,69
|
168
175
|
unfold/templates/unfold/helpers/pagination_ellipsis.html,sha256=Ar9Ntf2I_79mIVW5Hadwkn1Kx1Lj3d8eIXNXI1IIBfg,56
|
@@ -172,15 +179,16 @@ unfold/templates/unfold/helpers/site_icon.html,sha256=MWGECpFsRJcBJiLLxDbUUKTYLN
|
|
172
179
|
unfold/templates/unfold/helpers/site_logo.html,sha256=05tqXzHy--pluceRQ2jDUZCFX9DjPHdBqGaieUv9sXk,424
|
173
180
|
unfold/templates/unfold/helpers/submit.html,sha256=oSzq85LRLhdOlbFtFZFhYm6ucT95u6LunTeSTDClszQ,206
|
174
181
|
unfold/templates/unfold/helpers/tab_action.html,sha256=Hq20p5yRWi-wPwkFVI5uekoAFI4IlkucYr7o1qjlrYw,325
|
175
|
-
unfold/templates/unfold/helpers/tab_list.html,sha256=
|
176
|
-
unfold/templates/unfold/helpers/theme_switch.html,sha256=
|
177
|
-
unfold/templates/unfold/helpers/userlinks.html,sha256=
|
178
|
-
unfold/templates/unfold/helpers/welcomemsg.html,sha256=
|
182
|
+
unfold/templates/unfold/helpers/tab_list.html,sha256=MN8EzKsN7hBzTtlC71E1haSsDz2mCAhENLnVCi_00a0,4515
|
183
|
+
unfold/templates/unfold/helpers/theme_switch.html,sha256=LzMTlNEbZaMN8UpdXoVZ6_cFCX1iBd1UcmT3gmCZOYE,2196
|
184
|
+
unfold/templates/unfold/helpers/userlinks.html,sha256=yg6b17oFDzN9US7rnbzwwrmIzdull0yOc76nu2y_E-c,763
|
185
|
+
unfold/templates/unfold/helpers/welcomemsg.html,sha256=T50G1zypryUk0oOBmJCIvKioGIHbvYMPb1G243ONPQs,1670
|
179
186
|
unfold/templates/unfold/layouts/base.html,sha256=bAXZDbyiyxNiE-49mqr7pHUFhC2mHZQzIDUY-js_yZ0,379
|
180
|
-
unfold/templates/unfold/layouts/base_simple.html,sha256=
|
181
|
-
unfold/templates/unfold/layouts/skeleton.html,sha256=
|
182
|
-
unfold/templates/unfold/
|
183
|
-
unfold/templates/unfold/widgets/
|
187
|
+
unfold/templates/unfold/layouts/base_simple.html,sha256=Znb4SJqQ0Bk-sz4nPHrQXjLQtjmO6x1_xVtq7HxsJTI,1178
|
188
|
+
unfold/templates/unfold/layouts/skeleton.html,sha256=iXWxjILRlHzuIRC4JkSRDUVW6VfGnhrbeOYLlv8uWMU,4147
|
189
|
+
unfold/templates/unfold/templatetags/preserve_changelist_filters.html,sha256=sx2jUhogNY4emBhY8PqxQ6mXifbXQb_IQI9Hd0boJI0,111
|
190
|
+
unfold/templates/unfold/widgets/clearable_file_input.html,sha256=VrQJaYtdbWke1hkmx28nYLVgXlRK7c8lD2FftqadVpY,2160
|
191
|
+
unfold/templates/unfold/widgets/clearable_file_input_small.html,sha256=RaJ5ITNFudOI-L3M3RVD58jk_kUvzHVU4mwQYs6ETEo,2810
|
184
192
|
unfold/templates/unfold/widgets/date.html,sha256=WXo2LG1v_gBZBSg-zocj7oujMKI0MWLYCIFfB04HMLQ,122
|
185
193
|
unfold/templates/unfold/widgets/foreign_key_raw_id.html,sha256=Us8UqXRfRNWbQQn_9NMRO4ddUvt9Q53_NyFYUkdxY_g,1075
|
186
194
|
unfold/templates/unfold/widgets/radio.html,sha256=3WcmclQNg7R_pRjEHL1dHkGjAzWlWNYnhHkAirC4nuA,646
|
@@ -188,20 +196,20 @@ unfold/templates/unfold/widgets/radio_option.html,sha256=UVgNUd_DuIHc4tRpnvYnJwG
|
|
188
196
|
unfold/templates/unfold/widgets/range.html,sha256=oyA1EZRHotsAlLZfpy6oTiurEH4ygHnaUIAlpz99zKo,294
|
189
197
|
unfold/templates/unfold/widgets/related_widget_wrapper.html,sha256=YqKQ0PuHmEr_vp3eq7shcM87Cs-T8P1j-FXIhUa6vp4,3830
|
190
198
|
unfold/templates/unfold/widgets/split_datetime.html,sha256=-3nXwdQitkG_QtMXtQx76kO2_Z1F6xwPYmnjybBDLBo,1606
|
191
|
-
unfold/templates/unfold/widgets/split_datetime_vertical.html,sha256=
|
199
|
+
unfold/templates/unfold/widgets/split_datetime_vertical.html,sha256=39lZsRyRcKr8DIcy9oL39zC8nAHZTHwW6gyTYOKePrQ,806
|
192
200
|
unfold/templates/unfold/widgets/split_money.html,sha256=AFLUBmzGbY-RXgsfz7gaDxVRhplaIPhXjg_hWYo9xcY,352
|
193
201
|
unfold/templates/unfold/widgets/textarea.html,sha256=-ZLDGrtASero7L-J3VvTNq_KjPAZh_kLVw0Ow3awqXM,144
|
194
202
|
unfold/templates/unfold/widgets/textarea_expandable.html,sha256=4xIGWb20DuwiwumndByrAyh7xF-ReXKLulSpDImX_cs,459
|
195
203
|
unfold/templates/unfold/widgets/time.html,sha256=WXo2LG1v_gBZBSg-zocj7oujMKI0MWLYCIFfB04HMLQ,122
|
196
204
|
unfold/templates/unfold/widgets/url.html,sha256=IRLgW44VTKN7UrSWeywJwaxQhfG5jhhXuT-KTadKX58,304
|
197
205
|
unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
198
|
-
unfold/templatetags/unfold.py,sha256=
|
206
|
+
unfold/templatetags/unfold.py,sha256=7N4wUXIKjJazdbuHQs-H8xyRkWIhHVhk6j2rYE-yXW8,8379
|
199
207
|
unfold/templatetags/unfold_list.py,sha256=ofVee2a5WtBVNFExzqxvn8UrSxmPzczR4gF5jTbu0zU,13986
|
200
208
|
unfold/typing.py,sha256=1P8PWM2oeaceUJtA5j071RbKEBpHYaux441u7Hd6wv4,643
|
201
|
-
unfold/utils.py,sha256=
|
209
|
+
unfold/utils.py,sha256=36WgmgGRayf_fkNtjoFoI1_G9w8f8gZflNzzqQ3256U,5459
|
202
210
|
unfold/views.py,sha256=hQCyeeMa9kcJV1IZeeYqj8PGW7J4QWME8n-5n0UGmiU,1003
|
203
|
-
unfold/widgets.py,sha256=
|
204
|
-
django_unfold-0.
|
205
|
-
django_unfold-0.
|
206
|
-
django_unfold-0.
|
207
|
-
django_unfold-0.
|
211
|
+
unfold/widgets.py,sha256=wwiAbb_7-UWvFcH3HdnTv5f26fjiQn0h5tlAK3-kXVY,17186
|
212
|
+
django_unfold-0.43.0.dist-info/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
|
213
|
+
django_unfold-0.43.0.dist-info/METADATA,sha256=jJQ__BQbwCGpQ0GMEihLpYLcn3rm5IJWxLLJI-81jXA,4699
|
214
|
+
django_unfold-0.43.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
215
|
+
django_unfold-0.43.0.dist-info/RECORD,,
|
unfold/admin.py
CHANGED
@@ -240,6 +240,8 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin):
|
|
240
240
|
list_after_template = None
|
241
241
|
change_form_before_template = None
|
242
242
|
change_form_after_template = None
|
243
|
+
change_form_outer_before_template = None
|
244
|
+
change_form_outer_after_template = None
|
243
245
|
compressed_fields = False
|
244
246
|
readonly_preprocess_fields = {}
|
245
247
|
warn_unsaved_form = False
|
@@ -472,7 +474,12 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin):
|
|
472
474
|
for action in self.get_actions_row(request)
|
473
475
|
]
|
474
476
|
|
475
|
-
extra_context.update(
|
477
|
+
extra_context.update(
|
478
|
+
{
|
479
|
+
"actions_list": actions,
|
480
|
+
"actions_row": actions_row,
|
481
|
+
}
|
482
|
+
)
|
476
483
|
|
477
484
|
return super().changelist_view(request, extra_context)
|
478
485
|
|
unfold/components.py
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
from typing import Any, Dict, Optional, Type
|
2
|
+
|
3
|
+
from django.http import HttpRequest
|
4
|
+
|
5
|
+
|
6
|
+
class ComponentRegistry:
|
7
|
+
_registry: Dict[str, Type] = {}
|
8
|
+
|
9
|
+
@classmethod
|
10
|
+
def register_class(cls, component_cls: Type) -> None:
|
11
|
+
if not issubclass(component_cls, BaseComponent):
|
12
|
+
raise ValueError(
|
13
|
+
f"Class '{component_cls.__name__}' must inherit from BaseComponent."
|
14
|
+
)
|
15
|
+
|
16
|
+
class_name = component_cls.__name__
|
17
|
+
|
18
|
+
if class_name in cls._registry:
|
19
|
+
raise ValueError(f"Class '{class_name}' is already registered.")
|
20
|
+
|
21
|
+
cls._registry[class_name] = component_cls
|
22
|
+
|
23
|
+
@classmethod
|
24
|
+
def get_class(cls, class_name: str) -> Optional[Type]:
|
25
|
+
return cls._registry.get(class_name)
|
26
|
+
|
27
|
+
@classmethod
|
28
|
+
def create_instance(cls, class_name: str, **kwargs: Any) -> Any:
|
29
|
+
component_cls = cls.get_class(class_name)
|
30
|
+
|
31
|
+
if component_cls is None:
|
32
|
+
raise ValueError(f"Class '{class_name}' is not registered.")
|
33
|
+
|
34
|
+
return component_cls(**kwargs)
|
35
|
+
|
36
|
+
|
37
|
+
def register_component(cls: Type) -> Type:
|
38
|
+
ComponentRegistry.register_class(cls)
|
39
|
+
return cls
|
40
|
+
|
41
|
+
|
42
|
+
class BaseComponent:
|
43
|
+
def __init__(self, request: HttpRequest):
|
44
|
+
self.request = request
|
45
|
+
|
46
|
+
def get_context_data(self, **kwargs):
|
47
|
+
return kwargs
|
unfold/contrib/filters/admin.py
CHANGED
@@ -16,9 +16,10 @@ from django.db.models.fields import (
|
|
16
16
|
)
|
17
17
|
from django.forms import ValidationError
|
18
18
|
from django.http import HttpRequest
|
19
|
-
from django.utils.dateparse import parse_datetime
|
20
19
|
from django.utils.translation import gettext_lazy as _
|
21
20
|
|
21
|
+
from unfold.utils import parse_date_str, parse_datetime_str
|
22
|
+
|
22
23
|
from .forms import (
|
23
24
|
DropdownForm,
|
24
25
|
RangeDateForm,
|
@@ -468,25 +469,13 @@ class RangeDateFilter(admin.FieldListFilter):
|
|
468
469
|
def queryset(self, request: HttpRequest, queryset: QuerySet) -> QuerySet:
|
469
470
|
filters = {}
|
470
471
|
|
471
|
-
value_from = self.used_parameters.get(self.parameter_name + "_from"
|
472
|
+
value_from = self.used_parameters.get(self.parameter_name + "_from")
|
472
473
|
if value_from not in EMPTY_VALUES:
|
473
|
-
filters.update(
|
474
|
-
{
|
475
|
-
self.parameter_name + "__gte": self.used_parameters.get(
|
476
|
-
self.parameter_name + "_from", None
|
477
|
-
),
|
478
|
-
}
|
479
|
-
)
|
474
|
+
filters.update({self.parameter_name + "__gte": parse_date_str(value_from)})
|
480
475
|
|
481
|
-
value_to = self.used_parameters.get(self.parameter_name + "_to"
|
476
|
+
value_to = self.used_parameters.get(self.parameter_name + "_to")
|
482
477
|
if value_to not in EMPTY_VALUES:
|
483
|
-
filters.update(
|
484
|
-
{
|
485
|
-
self.parameter_name + "__lte": self.used_parameters.get(
|
486
|
-
self.parameter_name + "_to", None
|
487
|
-
),
|
488
|
-
}
|
489
|
-
)
|
478
|
+
filters.update({self.parameter_name + "__lte": parse_date_str(value_to)})
|
490
479
|
|
491
480
|
try:
|
492
481
|
return queryset.filter(**filters)
|
@@ -546,18 +535,22 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
546
535
|
|
547
536
|
if self.parameter_name + "_from_0" in params:
|
548
537
|
value = params.pop(self.field_path + "_from_0")
|
538
|
+
value = value[0] if isinstance(value, list) else value
|
549
539
|
self.used_parameters[self.field_path + "_from_0"] = value
|
550
540
|
|
551
541
|
if self.parameter_name + "_from_1" in params:
|
552
542
|
value = params.pop(self.field_path + "_from_1")
|
543
|
+
value = value[0] if isinstance(value, list) else value
|
553
544
|
self.used_parameters[self.field_path + "_from_1"] = value
|
554
545
|
|
555
546
|
if self.parameter_name + "_to_0" in params:
|
556
547
|
value = params.pop(self.field_path + "_to_0")
|
548
|
+
value = value[0] if isinstance(value, list) else value
|
557
549
|
self.used_parameters[self.field_path + "_to_0"] = value
|
558
550
|
|
559
551
|
if self.parameter_name + "_to_1" in params:
|
560
552
|
value = params.pop(self.field_path + "_to_1")
|
553
|
+
value = value[0] if isinstance(value, list) else value
|
561
554
|
self.used_parameters[self.field_path + "_to_1"] = value
|
562
555
|
|
563
556
|
def expected_parameters(self) -> List[str]:
|
@@ -571,20 +564,17 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
571
564
|
def queryset(self, request: HttpRequest, queryset: QuerySet) -> QuerySet:
|
572
565
|
filters = {}
|
573
566
|
|
574
|
-
date_value_from = self.used_parameters.get(
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
)
|
580
|
-
date_value_to = self.used_parameters.get(self.parameter_name + "_to_0", None)
|
581
|
-
time_value_to = self.used_parameters.get(self.parameter_name + "_to_1", None)
|
567
|
+
date_value_from = self.used_parameters.get(self.parameter_name + "_from_0")
|
568
|
+
time_value_from = self.used_parameters.get(self.parameter_name + "_from_1")
|
569
|
+
|
570
|
+
date_value_to = self.used_parameters.get(self.parameter_name + "_to_0")
|
571
|
+
time_value_to = self.used_parameters.get(self.parameter_name + "_to_1")
|
582
572
|
|
583
573
|
if date_value_from not in EMPTY_VALUES and time_value_from not in EMPTY_VALUES:
|
584
574
|
filters.update(
|
585
575
|
{
|
586
|
-
f"{self.parameter_name}__gte":
|
587
|
-
f"{date_value_from}
|
576
|
+
f"{self.parameter_name}__gte": parse_datetime_str(
|
577
|
+
f"{date_value_from} {time_value_from}"
|
588
578
|
),
|
589
579
|
}
|
590
580
|
)
|
@@ -592,8 +582,8 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
592
582
|
if date_value_to not in EMPTY_VALUES and time_value_to not in EMPTY_VALUES:
|
593
583
|
filters.update(
|
594
584
|
{
|
595
|
-
f"{self.parameter_name}__lte":
|
596
|
-
f"{date_value_to}
|
585
|
+
f"{self.parameter_name}__lte": parse_datetime_str(
|
586
|
+
f"{date_value_to} {time_value_to}"
|
597
587
|
),
|
598
588
|
}
|
599
589
|
)
|
@@ -612,16 +602,16 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
612
602
|
name=self.parameter_name,
|
613
603
|
data={
|
614
604
|
self.parameter_name + "_from_0": self.used_parameters.get(
|
615
|
-
self.parameter_name + "_from_0"
|
605
|
+
self.parameter_name + "_from_0"
|
616
606
|
),
|
617
607
|
self.parameter_name + "_from_1": self.used_parameters.get(
|
618
|
-
self.parameter_name + "_from_1"
|
608
|
+
self.parameter_name + "_from_1"
|
619
609
|
),
|
620
610
|
self.parameter_name + "_to_0": self.used_parameters.get(
|
621
|
-
self.parameter_name + "_to_0"
|
611
|
+
self.parameter_name + "_to_0"
|
622
612
|
),
|
623
613
|
self.parameter_name + "_to_1": self.used_parameters.get(
|
624
|
-
self.parameter_name + "_to_1"
|
614
|
+
self.parameter_name + "_to_1"
|
625
615
|
),
|
626
616
|
},
|
627
617
|
),
|
@@ -3,7 +3,7 @@
|
|
3
3
|
{% load admin_urls i18n guardian_tags %}
|
4
4
|
|
5
5
|
{% block breadcrumbs %}{% if not is_popup %}
|
6
|
-
<div class="px-4 lg:px-
|
6
|
+
<div class="px-4 lg:px-8">
|
7
7
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
8
8
|
<ul class="flex flex-wrap">
|
9
9
|
{% url 'admin:index' as link %}
|
@@ -1,21 +1,21 @@
|
|
1
1
|
{% load i18n unfold %}
|
2
2
|
|
3
3
|
{% block validation_errors %}
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
</h2>
|
9
|
-
</div>
|
4
|
+
{% capture as import_error silent %}
|
5
|
+
<span class="block font-semibold mb-2">
|
6
|
+
{% trans "Some rows failed to validate" %}
|
7
|
+
</span>
|
10
8
|
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
<span class="block">
|
10
|
+
{% trans "Please correct these errors in your data where possible, then reupload it using the form above." %}
|
11
|
+
</span>
|
12
|
+
{% endcapture %}
|
13
|
+
|
14
|
+
<div class="mt-8">
|
15
|
+
{% include "unfold/helpers/messages/error.html" with error=import_error %}
|
16
16
|
</div>
|
17
17
|
|
18
|
-
<table class="border-gray-200 border-spacing-none border-separate w-full lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
|
18
|
+
<table class="import-preview border-gray-200 border-spacing-none border-separate w-full lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
|
19
19
|
<thead class="hidden lg:table-header-group font-semibold text-gray-900 dark:text-gray-100">
|
20
20
|
<tr>
|
21
21
|
<th class="align-middle capitalize px-3 py-2 text-left">
|
@@ -41,19 +41,24 @@
|
|
41
41
|
{{ row.number }}
|
42
42
|
</td>
|
43
43
|
|
44
|
-
<td data-label="{% trans "Errors" %}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
|
45
|
-
<
|
46
|
-
<span class="bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white">{{ row.error_count }}</span>
|
47
|
-
</div>
|
44
|
+
<td data-label="{% trans "Errors" %}" class="errors align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
|
45
|
+
<span class="validation-error-count bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white">{{ row.error_count }}</span>
|
48
46
|
|
49
|
-
<div class="validation-error-container">
|
47
|
+
<div class="validation-error-container rounded-md !bg-white border left-12 !m-0 !p-0 !top-3 dark:!bg-gray-800 dark:!border-gray-700 min-w-72">
|
50
48
|
<ul class="validation-error-list">
|
51
49
|
{% for field_name, error_list in row.field_specific_errors.items %}
|
52
|
-
<li>
|
53
|
-
<span class="validation-error-field-label
|
54
|
-
|
50
|
+
<li class="p-3">
|
51
|
+
<span class="validation-error-field-label !border-0 font-semibold mb-1 !text-font-important-light dark:!text-font-important-dark">
|
52
|
+
{{ field_name }}
|
53
|
+
</span>
|
54
|
+
|
55
|
+
<ul class="text-xs !m-0">
|
55
56
|
{% for error in error_list %}
|
56
|
-
<li
|
57
|
+
<li class="!m-0">
|
58
|
+
<p class="leading-normal">
|
59
|
+
{{ error }}
|
60
|
+
</p>
|
61
|
+
</li>
|
57
62
|
{% endfor %}
|
58
63
|
</ul>
|
59
64
|
</li>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
{% load i18n %}
|
1
|
+
{% load unfold i18n %}
|
2
2
|
|
3
3
|
{% block fields_help %}
|
4
|
-
|
4
|
+
{% capture as fields_help silent %}
|
5
5
|
{% if import_or_export == "export" %}
|
6
6
|
{% trans "This exporter will export the following fields: " %}
|
7
7
|
{% elif import_or_export == "import" %}
|
@@ -20,5 +20,7 @@
|
|
20
20
|
{% endfor %}
|
21
21
|
</dl>
|
22
22
|
{% endif %}
|
23
|
-
|
23
|
+
{% endcapture %}
|
24
|
+
|
25
|
+
{% include "unfold/helpers/messages/info.html" with message=fields_help %}
|
24
26
|
{% endblock %}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div {% if not is_popup %}id="submit-row"{% endif %} class="relative z-20 {% if not is_popup %} mt-20 lg:mt-8{% endif %}">
|
4
4
|
<div class="{% if not is_popup %}bottom-0 fixed left-0 right-0{% endif %}" {% if not is_popup %}x-bind:class="{'xl:left-0': !sidebarDesktopOpen, 'xl:left-72': sidebarDesktopOpen}"{% endif %}>
|
5
|
-
<div class="bg-white dark:bg-gray-900 {% if not is_popup %}border-t px-4 py-4 relative scrollable-top lg:px-
|
5
|
+
<div class="bg-white dark:bg-gray-900 {% if not is_popup %}border-t px-4 py-4 relative scrollable-top lg:px-8 dark:border-gray-800{% endif %}">
|
6
6
|
<div class="container flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse">
|
7
7
|
{% if not revert_disabled %}
|
8
8
|
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-md text-sm text-white w-full lg:w-auto" name="_save" {{ onclick_attrib }}>
|