django-unfold 0.50.0__py3-none-any.whl → 0.52.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.50.0.dist-info → django_unfold-0.52.0.dist-info}/METADATA +2 -2
- {django_unfold-0.50.0.dist-info → django_unfold-0.52.0.dist-info}/RECORD +30 -29
- unfold/contrib/simple_history/templates/simple_history/object_history.html +2 -2
- unfold/decorators.py +3 -0
- unfold/sections.py +82 -0
- unfold/static/unfold/css/styles.css +1 -1
- unfold/styles.css +15 -5
- unfold/templates/admin/change_form.html +1 -1
- unfold/templates/admin/change_list_results.html +36 -6
- unfold/templates/admin/filter.html +1 -1
- unfold/templates/admin/submit_line.html +1 -1
- unfold/templates/unfold/components/card.html +1 -1
- unfold/templates/unfold/components/table.html +42 -26
- unfold/templates/unfold/helpers/change_list_filter_actions.html +1 -1
- unfold/templates/unfold/helpers/display_dropdown.html +33 -0
- unfold/templates/unfold/helpers/fieldset_row_checkbox.html +1 -1
- unfold/templates/unfold/helpers/fieldset_row_field.html +1 -1
- unfold/templates/unfold/helpers/messages/debug.html +2 -2
- unfold/templates/unfold/helpers/messages/info.html +2 -2
- unfold/templates/unfold/helpers/messages/success.html +2 -2
- unfold/templates/unfold/helpers/messages/warning.html +2 -2
- unfold/templates/unfold/widgets/date.html +1 -1
- unfold/templates/unfold/widgets/split_datetime.html +0 -8
- unfold/templates/unfold/widgets/time.html +1 -1
- unfold/templatetags/unfold.py +15 -3
- unfold/templatetags/unfold_list.py +20 -16
- unfold/utils.py +14 -0
- unfold/widgets.py +8 -10
- unfold/templates/unfold/widgets/textarea_expandable.html +0 -7
- {django_unfold-0.50.0.dist-info → django_unfold-0.52.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.50.0.dist-info → django_unfold-0.52.0.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: django-unfold
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.52.0
|
4
4
|
Summary: Modern Django admin theme for seamless interface development
|
5
5
|
License: MIT
|
6
6
|
Keywords: django,admin,tailwind,theme
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
20
|
-
Requires-Dist: django (>=
|
20
|
+
Requires-Dist: django (>=4.2)
|
21
21
|
Project-URL: Homepage, https://unfoldadmin.com
|
22
22
|
Project-URL: Repository, https://github.com/unfoldadmin/django-unfold
|
23
23
|
Description-Content-Type: text/markdown
|
@@ -67,12 +67,12 @@ unfold/contrib/inlines/checks.py,sha256=0vkHUh-MtNSTrcOjCLbZmtI4961fFOygOv_dBAps
|
|
67
67
|
unfold/contrib/inlines/forms.py,sha256=s49xrIkQTbvSMsrP4DydXWkpP1v8NCUmQw_Bcoqf0i4,1322
|
68
68
|
unfold/contrib/simple_history/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
69
69
|
unfold/contrib/simple_history/apps.py,sha256=eF_KVYb60CAnGgWk2Z1YKYGfgA3TJBMr229qI7e2pgU,153
|
70
|
-
unfold/contrib/simple_history/templates/simple_history/object_history.html,sha256=
|
70
|
+
unfold/contrib/simple_history/templates/simple_history/object_history.html,sha256=PvjiH97b8baU2pHsSCySlQ9267BHCSbPrHuzzqTaozk,1687
|
71
71
|
unfold/contrib/simple_history/templates/simple_history/object_history_form.html,sha256=JKCe-QTBZMB2ol5LPiX3gNuNxFpi_rqlXC9X92PFBPE,2296
|
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=
|
75
|
+
unfold/decorators.py,sha256=5fxobPFVlx4i-ldLm6M_ln3jFl261ZMKCcv9aXvXMVA,4082
|
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
|
@@ -81,12 +81,13 @@ 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/sections.py,sha256=Lcg3xCZ76fqjm4vD4x7YdE5VsbTKluL-sX5QTEBlHxA,2379
|
84
85
|
unfold/settings.py,sha256=3ICha2I0oSaHhajG8159nHdNTYJInBtRQq9VziWKYKs,2709
|
85
86
|
unfold/sites.py,sha256=Pl8voDdMH_9RV1n3XmSz84T6OE8yDUAqNwlr-kPH1n8,16179
|
86
87
|
unfold/static/admin/js/admin/RelatedObjectLookups.js,sha256=alI0-yq7YPDJJJn-yg1ce79-Cv88yQDUrfaGqFZnsaY,9048
|
87
88
|
unfold/static/admin/js/inlines.js,sha256=74QODSKEkpKse4bft4wIFZquROcr2-hVTt9CEWOIJak,15061
|
88
89
|
unfold/static/unfold/css/simplebar.css,sha256=5LLaEM11pKi6JFCOLt4XKuZxTpT9rpdq_tNlaQytFlU,4647
|
89
|
-
unfold/static/unfold/css/styles.css,sha256=
|
90
|
+
unfold/static/unfold/css/styles.css,sha256=QfcKos7Ys3mtWm3Q6BmsAkytkpoXIjQzM3D0P_A3FY4,160310
|
90
91
|
unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=-oiBJ7baAVtlVp8DUfO1w5GtkokElR8cIOn4RiqNleo,114840
|
91
92
|
unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=D_PpRhThST61VjFP0keubEqFp3g7TMhr5TmUDPg_Kkg,114348
|
92
93
|
unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=4G9rG8VTqupORmgCPtCrChRxKcMQf1Ebx9A9NhsK4IU,111268
|
@@ -104,7 +105,7 @@ unfold/static/unfold/js/chart.js,sha256=22W6cFERR-CElMOKRgMMicueMVP0Vf7FBEBYH8Z8
|
|
104
105
|
unfold/static/unfold/js/htmx.js,sha256=acrv0NqSJpBm5yXX_hdeJrnVDJYuMFZFnAxHcVTNudM,50918
|
105
106
|
unfold/static/unfold/js/select2.init.js,sha256=gXZngZh-l5ID2-VmndpGseNi6A0zKB18UgPyCor68CU,1040
|
106
107
|
unfold/static/unfold/js/simplebar.js,sha256=t-uG1FAD6ZoiMeN--wac0XRS7SxoDVG6zvRnGuEp7X8,27176
|
107
|
-
unfold/styles.css,sha256=
|
108
|
+
unfold/styles.css,sha256=6lYnrPCD8anvFHGN9DZJFsW8iDn7T3qvP-i8zNWulpo,19112
|
108
109
|
unfold/templates/admin/actions.html,sha256=aroIid16mORcx-0p8O2dOoWupEoTGX66pt-PAXjSYZ0,3063
|
109
110
|
unfold/templates/admin/app_index.html,sha256=GSBry97gDcK3scTP-Fs4FXcSItRxxE87Wv4sDtMTlbc,1244
|
110
111
|
unfold/templates/admin/app_list.html,sha256=VtntgHpbZdXbt_HXBLAtbuMdz1alS7F_S7eG37M5Rig,2855
|
@@ -112,17 +113,17 @@ unfold/templates/admin/auth/user/add_form.html,sha256=kZDtUyhrvCIH9rlAq0iXLKYt97
|
|
112
113
|
unfold/templates/admin/auth/user/change_password.html,sha256=OxpsKnVQm5lDrK5tGH0EAPFCPs288m0Jcy5WNYsdBXw,2896
|
113
114
|
unfold/templates/admin/base.html,sha256=3xQmoD_7cu2UlgEdvnt7v_CibT9t1Iul0b-VU2Awu_U,2395
|
114
115
|
unfold/templates/admin/base_site.html,sha256=UOsecaCycpyn_ygJNIKO7MQtDFJuHv--r83-mzaVY30,300
|
115
|
-
unfold/templates/admin/change_form.html,sha256=
|
116
|
+
unfold/templates/admin/change_form.html,sha256=TsKop_uAiuM3LLlW5YQ-9-zsTpbnOnCfIF2yMUn7NB8,5408
|
116
117
|
unfold/templates/admin/change_form_object_tools.html,sha256=eyeH-i2HgEM0Yi-OJA2D1VnKJyC19A_my1IDGxxoP8Y,593
|
117
118
|
unfold/templates/admin/change_list.html,sha256=AhGUdt-S3m30WhSraWnBdLwZQ1JU9yZeVDL0WDqCEMI,5164
|
118
119
|
unfold/templates/admin/change_list_object_tools.html,sha256=cmMiT2nT20Ph5yfpj9aHPr76Z-JP4aSXp0o-Rnad28s,147
|
119
|
-
unfold/templates/admin/change_list_results.html,sha256=
|
120
|
+
unfold/templates/admin/change_list_results.html,sha256=n64K5ocS62kujxzzkojzOx4jJuiYcO8r4mcJfcsCQAs,7931
|
120
121
|
unfold/templates/admin/date_hierarchy.html,sha256=Jl_Vk05fXvsSvod5Dw2p3KhpCQGjtSX1zqlNjjkBFR4,1411
|
121
122
|
unfold/templates/admin/delete_confirmation.html,sha256=yT_NHbFHZEjkSCaGVcM52GCG-FDmWiJdTFLbq9CBCx4,4619
|
122
123
|
unfold/templates/admin/delete_selected_confirmation.html,sha256=QR0JhrPR8YI8KpQnB3xyrKxaui-_pEQmfaMDbcXjjZ0,4391
|
123
124
|
unfold/templates/admin/edit_inline/stacked.html,sha256=-ASy7Jd0SwWBDxurucbus86YT2AokJEcCUrqPlHVDQA,7644
|
124
125
|
unfold/templates/admin/edit_inline/tabular.html,sha256=FBgzUb-U0cZCN28-cpHzRSyPE6bgseD_r3MY1AP0nGQ,2813
|
125
|
-
unfold/templates/admin/filter.html,sha256=
|
126
|
+
unfold/templates/admin/filter.html,sha256=0B_hpLybHw1wUPPCN3KJvoWrx03iFeqP8m1LRCjnLlQ,2012
|
126
127
|
unfold/templates/admin/includes/fieldset.html,sha256=gX-dc-jPLswk21XSKUXzAU8WFl3CFfeVrIAU2bviPyg,812
|
127
128
|
unfold/templates/admin/includes/object_delete_summary.html,sha256=FgwfapZCKWtnFtTHqh1MRuxxLot4bAw92WCcR_V8ImI,444
|
128
129
|
unfold/templates/admin/index.html,sha256=JnNDpNKqFKVKMQvpUQo6ddcFqGadK5g78pxpKAHLuMU,583
|
@@ -131,13 +132,13 @@ unfold/templates/admin/nav_sidebar.html,sha256=cadJwXcReRHwVTpXGycF3uv5VZ5JDcIbY
|
|
131
132
|
unfold/templates/admin/object_history.html,sha256=bfad4_lfLQFcoMV67yW7BnAi1Hwrptmgxj2tgPYQjtI,4816
|
132
133
|
unfold/templates/admin/pagination.html,sha256=1UIc6Hm2LnDDAHUE5UjuPzdFdiAat4tF6sk058UfRP0,2251
|
133
134
|
unfold/templates/admin/search_form.html,sha256=eQkwq4OWVgNUSjZPzxAjtT4LcxUNcTSgDVKJ4lWwslQ,1447
|
134
|
-
unfold/templates/admin/submit_line.html,sha256=
|
135
|
+
unfold/templates/admin/submit_line.html,sha256=GN86RzCT3aETQDC5ROMWesxf0QhqIFD218jee_P1_u4,4832
|
135
136
|
unfold/templates/auth/widgets/read_only_password_hash.html,sha256=bQiYKDKJkyVP0_2eJG16oKviB4WEA0V7lSp6sGfgows,751
|
136
137
|
unfold/templates/registration/logged_out.html,sha256=GgLzqmOGpiw5FcA-Aw_T6YvhYHhGFWhyES40T28waLQ,1002
|
137
138
|
unfold/templates/registration/password_change_done.html,sha256=9HDpSraz3Kxdy0Fghbn-Lv0GAtpPgG6cuO7fvfMiYg8,1077
|
138
139
|
unfold/templates/registration/password_change_form.html,sha256=EgakVWzpQUEJKQS0AOfk8O_CY1bKbyWXSUuBaxtQEdU,2232
|
139
140
|
unfold/templates/unfold/components/button.html,sha256=TABo79ppuGlm2ENvRs6L3Vne8B5_9he_OhZTnPMiitQ,473
|
140
|
-
unfold/templates/unfold/components/card.html,sha256=
|
141
|
+
unfold/templates/unfold/components/card.html,sha256=FVLN7kQZqMd_uhEi1LpiN9FUxZCa4RgGHYGmofCtQro,1141
|
141
142
|
unfold/templates/unfold/components/chart/bar.html,sha256=nDdDCUXvFd793OpNgNPQo0vBmvYngMsQyPHVTf1vfOw,297
|
142
143
|
unfold/templates/unfold/components/chart/cohort.html,sha256=elZj9e9E9cfVey_9LSOaDoVSE3Wn3BagSrwIXRSFadM,2354
|
143
144
|
unfold/templates/unfold/components/chart/line.html,sha256=DHaZUFTlCs5cX7ioYdTzoN4ITHWNcEoNSUp7v3hlo_E,298
|
@@ -147,7 +148,7 @@ unfold/templates/unfold/components/icon.html,sha256=Qlhcf41FOwNVJ-nvA0RJ_Dn6JW6P
|
|
147
148
|
unfold/templates/unfold/components/navigation.html,sha256=NCPFXM1Q__2LoIyNNYbhhZZPtdw3eLvmc9vlhnm9mhg,887
|
148
149
|
unfold/templates/unfold/components/progress.html,sha256=BnH2uC_ZL5ITvMjHiHoM0gjtbRTLNU1-tFcfCuJO0BE,808
|
149
150
|
unfold/templates/unfold/components/separator.html,sha256=yvHywT_MFkx5dNC2K53OFHRGxLDsEjRpptujXyGeoTY,168
|
150
|
-
unfold/templates/unfold/components/table.html,sha256=
|
151
|
+
unfold/templates/unfold/components/table.html,sha256=rgz-it5ZH6_G_HLAlLluh2IDxM7yw5m7Hxpg1HQj4oI,3092
|
151
152
|
unfold/templates/unfold/components/text.html,sha256=-GjxvdiaBQIaNfPSzT6SSIwnc3R27FkSDQMoF3FDPso,102
|
152
153
|
unfold/templates/unfold/components/title.html,sha256=aMYSO30ybFYqPnqwlJVh2uNmcgnVrRycZkHTjJTjpX8,171
|
153
154
|
unfold/templates/unfold/components/tracker.html,sha256=-PvDHdAAB2G5mKXpQUtljWJYhhavsa1aEoBvLrCiCJo,284
|
@@ -161,8 +162,9 @@ unfold/templates/unfold/helpers/boolean.html,sha256=kcSZr3siQeBWIy_jsx1tFf4m6IB3
|
|
161
162
|
unfold/templates/unfold/helpers/breadcrumb_item.html,sha256=9T6ojN7LOXIlgwSwlIwHgy5U22eQYtarCqcmzsQIoPU,201
|
162
163
|
unfold/templates/unfold/helpers/change_list_actions.html,sha256=p1_vC2Q_Fb-gAHA8y1zzOXqqn5TPQMrQfE26PkOY_ok,656
|
163
164
|
unfold/templates/unfold/helpers/change_list_filter.html,sha256=0l-c4H2PcDkAuzI6asAJf2rBfYavYG62F9d7yWWdkSI,1852
|
164
|
-
unfold/templates/unfold/helpers/change_list_filter_actions.html,sha256=
|
165
|
+
unfold/templates/unfold/helpers/change_list_filter_actions.html,sha256=fTlM6jyS83FhGulFYuhFVLJOGHRJV3mFCWDQnp1kp0U,1760
|
165
166
|
unfold/templates/unfold/helpers/delete_submit_line.html,sha256=N1w_TDIDN7Spj5diuhRUVOVgz2TiSeHVK2QvBjTLv2w,665
|
167
|
+
unfold/templates/unfold/helpers/display_dropdown.html,sha256=e83t_lR2uSxnNoDYKnTKyD57V3FTMCM9T0h0DeFdAV8,2850
|
166
168
|
unfold/templates/unfold/helpers/display_header.html,sha256=rhru2GSxR0mH8_FEQuQVIS8gGGjaiWMV9f2HCPGMsaQ,1698
|
167
169
|
unfold/templates/unfold/helpers/display_label.html,sha256=LS9DWzYjHkYLV27sZDwyXlg2sLJ0AlId9FbjnXpsbfg,317
|
168
170
|
unfold/templates/unfold/helpers/edit_inline/tabular_delete.html,sha256=KFp6d8whXp2DlRyHJF1OsCkJa3Vy-UU-nkQXSlpuui0,928
|
@@ -176,8 +178,8 @@ unfold/templates/unfold/helpers/field.html,sha256=Ds-zUHkdyxamfUCVNhxvtM0XoJg9OC
|
|
176
178
|
unfold/templates/unfold/helpers/field_readonly.html,sha256=4qtXjWE7SA2qZSTYLOv0lT4pQfD0TE34mvWQJY7jhS8,237
|
177
179
|
unfold/templates/unfold/helpers/field_readonly_value.html,sha256=6DNteF8x6_tihQZVCGgz2CqB0ogsLRJhxgDep0sHguc,464
|
178
180
|
unfold/templates/unfold/helpers/fieldset_row.html,sha256=GSrMJZSNY1Tn6y3APOAeADg8Vdsa9QO_RMtj4I2SvQM,445
|
179
|
-
unfold/templates/unfold/helpers/fieldset_row_checkbox.html,sha256=
|
180
|
-
unfold/templates/unfold/helpers/fieldset_row_field.html,sha256=
|
181
|
+
unfold/templates/unfold/helpers/fieldset_row_checkbox.html,sha256=fJh5dZstm8f8pPTbN1pg5VSYPkQB4EnqSfh9RpsxdXk,1472
|
182
|
+
unfold/templates/unfold/helpers/fieldset_row_field.html,sha256=xXxmELXMXzbNclp36rQn_09Uekq-RQkDP3kRT0Bp6rA,643
|
181
183
|
unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=KW2rzVqpIICEu55GR_KnuOoXOGnqTZOQAKIuW-u8cAU,1459
|
182
184
|
unfold/templates/unfold/helpers/form_errors.html,sha256=EwerIJptSCWXvtAJ1IZKfEn98qlShBIGavsTThbklAs,266
|
183
185
|
unfold/templates/unfold/helpers/form_label.html,sha256=BRX3DxVQfEvcmpFcRuhl4v_icMCCd5O_zmYm6MGLtts,327
|
@@ -187,12 +189,12 @@ unfold/templates/unfold/helpers/help_text.html,sha256=o-2_hyruIr_Xt0fo38aGgrpptP
|
|
187
189
|
unfold/templates/unfold/helpers/history.html,sha256=QUYUQXcccyIl9pKPwVS_R8Is2Zo096rLZA6inlGNhkw,1921
|
188
190
|
unfold/templates/unfold/helpers/label.html,sha256=pGzRBfuY8tos-imyA9psBxj7r93LUTfr78ff2rYPvmc,900
|
189
191
|
unfold/templates/unfold/helpers/language_switch.html,sha256=RB7TMbLFaDejOLoNtE1mQoCtqVMfLTvgpLfTBXj85_s,1486
|
190
|
-
unfold/templates/unfold/helpers/messages/debug.html,sha256=
|
192
|
+
unfold/templates/unfold/helpers/messages/debug.html,sha256=ClWZQzt8uTiLfcIsc9oDOrB3kgljuDz34LyLsmgXUSc,145
|
191
193
|
unfold/templates/unfold/helpers/messages/error.html,sha256=5s51qKr0vHnIWngsc2U1TK9mAV3yBqwa7ekAYMyumlI,592
|
192
194
|
unfold/templates/unfold/helpers/messages/errornote.html,sha256=pJ4Xjmp6ZimpimqMYUdCK6VZcWn_qlCSNTjRyyiZu-E,393
|
193
|
-
unfold/templates/unfold/helpers/messages/info.html,sha256=
|
194
|
-
unfold/templates/unfold/helpers/messages/success.html,sha256=
|
195
|
-
unfold/templates/unfold/helpers/messages/warning.html,sha256=
|
195
|
+
unfold/templates/unfold/helpers/messages/info.html,sha256=5mPLzuunnJp577AGdUhwXH3YGi7EppPSEuX6BrZlmnc,145
|
196
|
+
unfold/templates/unfold/helpers/messages/success.html,sha256=e9X3RST_TFgUE9V9AzAwnm45MDA-3BZVwLBNE67WzH4,149
|
197
|
+
unfold/templates/unfold/helpers/messages/warning.html,sha256=FJi-V1fAD-x54-R2UZCllCwiqWQOhI9THsXXoSLKXl8,153
|
196
198
|
unfold/templates/unfold/helpers/messages.html,sha256=I9RIKfi4T65AG16-2s0C32RwbFkn0qLhdSqDfXpSbyE,915
|
197
199
|
unfold/templates/unfold/helpers/navigation.html,sha256=HNr9bxZOg84zsbgORkOhJFXKSp0c2im438yiWCfonb0,787
|
198
200
|
unfold/templates/unfold/helpers/navigation_header.html,sha256=upSSMGsqVzk_HfNINcapUtmR_d8kV2yxdwPEjMbRknY,1402
|
@@ -218,27 +220,26 @@ unfold/templates/unfold/layouts/skeleton.html,sha256=TmZ0hX5j7McwSiYcdGGuhAjDunP
|
|
218
220
|
unfold/templates/unfold/templatetags/preserve_changelist_filters.html,sha256=sx2jUhogNY4emBhY8PqxQ6mXifbXQb_IQI9Hd0boJI0,111
|
219
221
|
unfold/templates/unfold/widgets/clearable_file_input.html,sha256=4vsLRjqOmGqdU4aPSq81rc-mdRvpBr-H_bC5ScyUkEY,2231
|
220
222
|
unfold/templates/unfold/widgets/clearable_file_input_small.html,sha256=NNlosUwhzv-3SZH9LdliL5c6fdoVNRb1JP0uHwFV-N8,2849
|
221
|
-
unfold/templates/unfold/widgets/date.html,sha256=
|
223
|
+
unfold/templates/unfold/widgets/date.html,sha256=ih9wj8koTaHb9s1NGUmyN9rHvSAmqCMbti9ONDOIujg,122
|
222
224
|
unfold/templates/unfold/widgets/foreign_key_raw_id.html,sha256=7-JPapXS2Ty0MLXNdZ1jCuydqc6JyDs-8-w9b8TcmVU,1075
|
223
225
|
unfold/templates/unfold/widgets/radio.html,sha256=7Mgc92mMwJdVLjCxoGj5lo76KNaN5dKKktV3vzmbeqA,652
|
224
226
|
unfold/templates/unfold/widgets/radio_option.html,sha256=UVgNUd_DuIHc4tRpnvYnJwG67PycYT2sBAyuVGAY0RM,307
|
225
227
|
unfold/templates/unfold/widgets/range.html,sha256=Zhfj2VTusS3nZjOYR7slcjk1JtFK0psZbaSCw6TDY1I,294
|
226
228
|
unfold/templates/unfold/widgets/related_widget_wrapper.html,sha256=4RsFmwlm6De85wsP6W4PvqKosNUPKKNb95RIRh0UUgs,3895
|
227
|
-
unfold/templates/unfold/widgets/split_datetime.html,sha256
|
229
|
+
unfold/templates/unfold/widgets/split_datetime.html,sha256=2-k9cF1iAeYp3iUT4_9KIIDyZEG3Z25ls34dLan9Z3M,1094
|
228
230
|
unfold/templates/unfold/widgets/split_datetime_vertical.html,sha256=39lZsRyRcKr8DIcy9oL39zC8nAHZTHwW6gyTYOKePrQ,806
|
229
231
|
unfold/templates/unfold/widgets/split_money.html,sha256=AFLUBmzGbY-RXgsfz7gaDxVRhplaIPhXjg_hWYo9xcY,352
|
230
232
|
unfold/templates/unfold/widgets/textarea.html,sha256=-ZLDGrtASero7L-J3VvTNq_KjPAZh_kLVw0Ow3awqXM,144
|
231
|
-
unfold/templates/unfold/widgets/
|
232
|
-
unfold/templates/unfold/widgets/time.html,sha256=WXo2LG1v_gBZBSg-zocj7oujMKI0MWLYCIFfB04HMLQ,122
|
233
|
+
unfold/templates/unfold/widgets/time.html,sha256=ih9wj8koTaHb9s1NGUmyN9rHvSAmqCMbti9ONDOIujg,122
|
233
234
|
unfold/templates/unfold/widgets/url.html,sha256=IRLgW44VTKN7UrSWeywJwaxQhfG5jhhXuT-KTadKX58,304
|
234
235
|
unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
235
|
-
unfold/templatetags/unfold.py,sha256=
|
236
|
-
unfold/templatetags/unfold_list.py,sha256
|
236
|
+
unfold/templatetags/unfold.py,sha256=rNpa1B9bEM-HQRWEss4PZ_nwnTRR8L3J12qOcjR5A_k,14550
|
237
|
+
unfold/templatetags/unfold_list.py,sha256=ayShOYEXcV3o7wKt3t2aFTWvg62Mb-WGlxjYVGgk3a0,14344
|
237
238
|
unfold/typing.py,sha256=i7LM2LiwYTAjT5-OLDUPVn5b9X-DMmHnjlZG2toWwSE,692
|
238
|
-
unfold/utils.py,sha256=
|
239
|
+
unfold/utils.py,sha256=oB71xynQQEXj055BkTVwc4pz5hXk6tipFBAIU8TWDyA,5838
|
239
240
|
unfold/views.py,sha256=FuYnMrlg6SegLUDDN6An__yZj8rchD_iBK8myieYhkA,1492
|
240
|
-
unfold/widgets.py,sha256=
|
241
|
-
django_unfold-0.
|
242
|
-
django_unfold-0.
|
243
|
-
django_unfold-0.
|
244
|
-
django_unfold-0.
|
241
|
+
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,,
|
@@ -28,8 +28,8 @@
|
|
28
28
|
{{ page_obj.paginator.count }} {% blocktranslate count counter=page_obj.paginator.count %}entry{% plural %}entries{% endblocktranslate %}
|
29
29
|
</div>
|
30
30
|
{% else %}
|
31
|
-
<
|
31
|
+
<div class="mb-3 px-3 py-3 rounded text-sm last:mb-8 bg-amber-100 text-amber-600 dark:bg-amber-600/20 dark:border-amber-600/10">
|
32
32
|
{% trans "This object doesn't have a change history." %}
|
33
|
-
</
|
33
|
+
</div>
|
34
34
|
{% endif %}
|
35
35
|
{% endblock %}
|
unfold/decorators.py
CHANGED
@@ -84,6 +84,7 @@ def display(
|
|
84
84
|
ordering: Optional[Union[str, Combinable, BaseExpression]] = None,
|
85
85
|
description: Optional[str] = None,
|
86
86
|
empty_value: Optional[str] = None,
|
87
|
+
dropdown: Optional[bool] = None,
|
87
88
|
label: Optional[Union[bool, str, dict[str, str]]] = None,
|
88
89
|
header: Optional[bool] = None,
|
89
90
|
) -> Callable:
|
@@ -107,6 +108,8 @@ def display(
|
|
107
108
|
func.label = label
|
108
109
|
if header is not None:
|
109
110
|
func.header = header
|
111
|
+
if dropdown is not None:
|
112
|
+
func.dropdown = dropdown
|
110
113
|
|
111
114
|
return func
|
112
115
|
|
unfold/sections.py
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
from django.contrib.admin.utils import label_for_field, lookup_field
|
2
|
+
from django.db.models import Model
|
3
|
+
from django.http import HttpRequest
|
4
|
+
from django.template.loader import render_to_string
|
5
|
+
|
6
|
+
from unfold.utils import display_for_field
|
7
|
+
|
8
|
+
|
9
|
+
class BaseSection:
|
10
|
+
def __init__(self, request: HttpRequest, instance: Model) -> None:
|
11
|
+
self.request = request
|
12
|
+
self.instance = instance
|
13
|
+
|
14
|
+
def render(self) -> str:
|
15
|
+
raise NotImplementedError(
|
16
|
+
"Section subclasses must implement the render method."
|
17
|
+
)
|
18
|
+
|
19
|
+
|
20
|
+
class TableSection(BaseSection):
|
21
|
+
fields = []
|
22
|
+
related_name = None
|
23
|
+
verbose_name = None
|
24
|
+
height = None
|
25
|
+
|
26
|
+
def render(self) -> str:
|
27
|
+
results = getattr(self.instance, self.related_name)
|
28
|
+
headers = []
|
29
|
+
rows = []
|
30
|
+
|
31
|
+
for field_name in self.fields:
|
32
|
+
if hasattr(self, field_name):
|
33
|
+
if hasattr(getattr(self, field_name), "short_description"):
|
34
|
+
headers.append(getattr(self, field_name).short_description)
|
35
|
+
else:
|
36
|
+
headers.append(field_name)
|
37
|
+
else:
|
38
|
+
headers.append(label_for_field(field_name, results.model))
|
39
|
+
|
40
|
+
for result in results.all():
|
41
|
+
row = []
|
42
|
+
|
43
|
+
for field_name in self.fields:
|
44
|
+
if hasattr(self, field_name):
|
45
|
+
row.append(getattr(self, field_name)(result))
|
46
|
+
else:
|
47
|
+
field, attr, value = lookup_field(field_name, result)
|
48
|
+
row.append(display_for_field(value, field, "-"))
|
49
|
+
|
50
|
+
rows.append(row)
|
51
|
+
|
52
|
+
context = {
|
53
|
+
"request": self.request,
|
54
|
+
"table": {
|
55
|
+
"headers": headers,
|
56
|
+
"rows": rows,
|
57
|
+
},
|
58
|
+
}
|
59
|
+
|
60
|
+
if hasattr(self, "verbose_name") and self.verbose_name:
|
61
|
+
context["title"] = self.verbose_name
|
62
|
+
|
63
|
+
if hasattr(self, "height") and self.height:
|
64
|
+
context["height"] = self.height
|
65
|
+
|
66
|
+
return render_to_string(
|
67
|
+
"unfold/components/table.html",
|
68
|
+
context=context,
|
69
|
+
)
|
70
|
+
|
71
|
+
|
72
|
+
class TemplateSection(BaseSection):
|
73
|
+
template_name = None
|
74
|
+
|
75
|
+
def render(self) -> str:
|
76
|
+
return render_to_string(
|
77
|
+
self.template_name,
|
78
|
+
context={
|
79
|
+
"request": self.request,
|
80
|
+
"instance": self.instance,
|
81
|
+
},
|
82
|
+
)
|