django-unfold 0.68.0__py3-none-any.whl → 0.69.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.68.0.dist-info → django_unfold-0.69.0.dist-info}/METADATA +31 -42
- {django_unfold-0.68.0.dist-info → django_unfold-0.69.0.dist-info}/RECORD +33 -29
- unfold/admin.py +8 -37
- unfold/datasets.py +22 -1
- unfold/forms.py +22 -15
- unfold/mixins/__init__.py +2 -1
- unfold/mixins/dataset_model_admin.py +62 -0
- unfold/settings.py +1 -0
- unfold/sites.py +5 -1
- unfold/static/admin/js/actions.js +246 -0
- unfold/static/unfold/css/styles.css +2 -2
- unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2 +0 -0
- unfold/templates/admin/actions.html +2 -2
- unfold/templates/admin/change_form.html +8 -4
- unfold/templates/admin/change_list.html +1 -1
- unfold/templates/admin/change_list_results.html +1 -1
- unfold/templates/admin/dataset_actions.html +50 -0
- unfold/templates/admin/edit_inline/stacked.html +1 -7
- unfold/templates/admin/edit_inline/tabular.html +1 -7
- unfold/templates/admin/includes/fieldset.html +1 -3
- unfold/templates/admin/search_form.html +1 -1
- unfold/templates/registration/password_change_done.html +3 -4
- unfold/templates/registration/password_change_form.html +10 -6
- unfold/templates/unfold/helpers/change_list_actions.html +1 -1
- unfold/templates/unfold/helpers/dataset.html +19 -7
- unfold/templates/unfold/helpers/fieldsets_tabs.html +9 -11
- unfold/templates/unfold/helpers/inline_heading.html +11 -0
- unfold/templates/unfold/helpers/tab_items.html +6 -4
- unfold/templatetags/unfold.py +47 -70
- unfold/templatetags/unfold_list.py +12 -0
- unfold/widgets.py +1 -2
- {django_unfold-0.68.0.dist-info → django_unfold-0.69.0.dist-info}/WHEEL +0 -0
- {django_unfold-0.68.0.dist-info → django_unfold-0.69.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-unfold
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.69.0
|
|
4
4
|
Summary: Modern Django admin theme for seamless interface development
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE.md
|
|
@@ -33,7 +33,7 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|

|
|
34
34
|

|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Modern theme that upgrades Django admin with beautiful design, advanced features, and easy customization.
|
|
37
37
|
|
|
38
38
|
- **Documentation:** The full documentation is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
|
39
39
|
- **Unfold:** The demo site is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
|
@@ -41,60 +41,49 @@ Transform your Django admin into a powerful, modern administrative interface wit
|
|
|
41
41
|
- **Turbo:** A Django & Next.js boilerplate implementing Unfold is available at [github.com/unfoldadmin/turbo](https://github.com/unfoldadmin/turbo?utm_medium=github&utm_source=unfold).
|
|
42
42
|
- **Discord:** Join our Unfold community on [Discord](https://discord.gg/9sQj9MEbNz).
|
|
43
43
|
|
|
44
|
-
## Profesional
|
|
44
|
+
## Profesional services
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Need expert help with Django or Unfold? We offer services to support your project:
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
- **Consulting**: Expert guidance on Django architecture, performance, feature development, and Unfold integration. [Learn more](https://unfoldadmin.com/consulting/?utm_medium=github&utm_source=unfold)
|
|
49
|
+
- **Support**: Assistance with integrating or customizing Unfold, including live 1:1 calls and implementation review. Fixed price, no ongoing commitment. [Learn more](https://unfoldadmin.com/support/?utm_medium=github&utm_source=unfold)
|
|
50
|
+
- **Studio**: Visually customize Django admin with own color schemes. Access a variety of dashboard templates, a password reset flow, and more. [Learn more](https://unfoldadmin.com/studio?utm_medium=github&utm_source=unfold)
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
Ideal for teams looking to scale, modernize, or customize their Django projects with expert support. Learn more at [unfoldadmin.com/consulting](https://unfoldadmin.com/consulting/?utm_medium=github&utm_source=unfold).
|
|
52
|
+
[](https://unfoldadmin.com/studio?utm_medium=github&utm_source=unfold)
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
## Latest improvements
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
- **Datasets**: Display custom changelists on change form detail pages.
|
|
57
|
+
- **Command**: Offers a command palette for quick searching across all models or custom-injected data.
|
|
58
|
+
- **Constance**: Official `django-constance` support with a completely new design and UX improvements.
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
## Core features
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
[](https://unfoldadmin.com/studio)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## Fresh Features & Enhancements
|
|
65
|
-
|
|
66
|
-
- **Command**: Offers a command palette for quick searching across all models or custom-injected data
|
|
67
|
-
- **django-constance**: Official support with a completely new design and UX improvements
|
|
68
|
-
- **Paginated inlines:** Break down large record sets into pages within inlines for better admin performance
|
|
69
|
-
- **Conditional fields:** Show or hide fields dynamically based on the values of other fields in the form
|
|
70
|
-
- **Infinite paginator:** Efficiently handle large datasets with seamless pagination that reduces server load
|
|
71
|
-
|
|
72
|
-
## Core Features & Capabilities
|
|
73
|
-
|
|
74
|
-
- **Visual Interface**: Provides a modern user interface based on the Tailwind CSS framework.
|
|
62
|
+
- **Visual interface**: Provides a modern user interface based on the Tailwind CSS framework.
|
|
75
63
|
- **Sidebar navigation**: Simplifies the creation of sidebar menus with icons, collapsible sections, and more.
|
|
76
64
|
- **Dark mode support**: Includes both light and dark mode themes.
|
|
77
65
|
- **Flexible actions**: Provides multiple ways to define actions throughout the admin interface.
|
|
78
66
|
- **Advanced filters**: Features custom dropdowns, autocomplete, numeric, datetime, and text field filters.
|
|
79
67
|
- **Dashboard tools**: Includes helpers for building custom dashboard pages.
|
|
80
68
|
- **UI components**: Offers reusable interface components such as cards, buttons, and charts.
|
|
81
|
-
- **Crispy forms**: Custom template pack for django-crispy-forms to style forms with Unfold's design system
|
|
69
|
+
- **Crispy forms**: Custom template pack for django-crispy-forms to style forms with Unfold's design system.
|
|
82
70
|
- **WYSIWYG editor**: Built-in support for WYSIWYG editing through Trix.
|
|
83
|
-
- **Array widget:** Built-in widget for `django.contrib.postgres.fields.ArrayField
|
|
84
|
-
- **Inline tabs:** Group inlines into tab navigation in the change form
|
|
85
|
-
- **Conditional fields:** Show or hide fields dynamically based on the values of other fields in the form
|
|
86
|
-
- **Model tabs:** Allow defining custom tab navigation for models
|
|
87
|
-
- **Fieldset tabs:** Merge multiple fieldsets into tabs in the change form
|
|
88
|
-
- **Sortable inlines:** Allow sorting inlines by dragging and dropping
|
|
89
|
-
- **Command**: Offers a command palette for quick searching across all models or custom-injected data
|
|
90
|
-
- **
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
-
- **
|
|
94
|
-
- **
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
97
|
-
- **
|
|
71
|
+
- **Array widget:** Built-in widget for `django.contrib.postgres.fields.ArrayField`.
|
|
72
|
+
- **Inline tabs:** Group inlines into tab navigation in the change form.
|
|
73
|
+
- **Conditional fields:** Show or hide fields dynamically based on the values of other fields in the form.
|
|
74
|
+
- **Model tabs:** Allow defining custom tab navigation for models.
|
|
75
|
+
- **Fieldset tabs:** Merge multiple fieldsets into tabs in the change form.
|
|
76
|
+
- **Sortable inlines:** Allow sorting inlines by dragging and dropping.
|
|
77
|
+
- **Command**: Offers a command palette for quick searching across all models or custom-injected data.
|
|
78
|
+
- **Datasets**: Custom changelists `ModelAdmin` displayed on change form detail pages.
|
|
79
|
+
- **Environment label:** Distinguish between environments by displaying a label.
|
|
80
|
+
- **Nonrelated inlines:** Display nonrelated models as inlines in the change form.
|
|
81
|
+
- **Paginated inlines:** Break down large record sets into pages within inlines for better admin performance.
|
|
82
|
+
- **Favicons:** Built-in support for configuring various site favicons.
|
|
83
|
+
- **Themes:** Allow customization of color scheme, background color, border radius, and more.
|
|
84
|
+
- **Font colors:** Adjust font colors for better readability.
|
|
85
|
+
- **Changeform modes:** Display fields in compressed mode in the change form.
|
|
86
|
+
- **Language switcher:** Allow changing language directly from the admin area.
|
|
98
87
|
- **Infinite paginator:** Efficiently handle large datasets with seamless pagination that reduces server load
|
|
99
88
|
- **Parallel admin:** Supports [running the default admin](https://unfoldadmin.com/blog/migrating-django-admin-unfold/?utm_medium=github&utm_source=unfold) alongside Unfold.
|
|
100
89
|
- **Third-party packages:** Provides default support for multiple popular applications.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
unfold/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
unfold/admin.py,sha256=
|
|
2
|
+
unfold/admin.py,sha256=tUzwLFV-auNMyt9Ri7woYZCFlwekHE8iy2fHTtjtmaE,8493
|
|
3
3
|
unfold/apps.py,sha256=SlBXPYrUd2uXn67qFbRvbXSUk3XFWrF4-5WELgDCvho,381
|
|
4
4
|
unfold/checks.py,sha256=e5HEhbXRcu3FwZDT_d-IbimeVpjJ6jgCUPXWvsUjEw0,2601
|
|
5
5
|
unfold/components.py,sha256=E5sl0y3XDPSswHbRLVnJrdKNpZzZ-e5q4tLwMGACyZo,1270
|
|
@@ -87,26 +87,28 @@ unfold/contrib/simple_history/templates/simple_history/object_history_form.html,
|
|
|
87
87
|
unfold/contrib/simple_history/templates/simple_history/object_history_list.html,sha256=kMtxD5II32etsk05IArxe_wGvVjrizMVVH8uRl5RjR0,6816
|
|
88
88
|
unfold/contrib/simple_history/templates/simple_history/submit_line.html,sha256=PEoPmWcWiiBIMs6XtXcoXswDtxp3FgntR3maieLDt4Y,1618
|
|
89
89
|
unfold/dataclasses.py,sha256=nCzcUufg60HHlJcAAgfSI_YPjXil3s2uMMhlJI0Lidk,803
|
|
90
|
-
unfold/datasets.py,sha256=
|
|
90
|
+
unfold/datasets.py,sha256=LXBNlNRdkp846tjTyKz49ckjTTnzjzJiOqCaOu-jkC8,2812
|
|
91
91
|
unfold/decorators.py,sha256=WWDhYipXs-z9ppyAteC9HVWJGvv8B-gIigrTF6hj4KM,4844
|
|
92
92
|
unfold/enums.py,sha256=9sTfyEycMWeoGPBa-ft6ZhQGnW1vkFg108RMBVf9nko,187
|
|
93
93
|
unfold/exceptions.py,sha256=gcCj1ox61E137bk_0Cqy4YC3SttdPgB-fiJUqpmyHSE,43
|
|
94
94
|
unfold/fields.py,sha256=883cbZFen5Ss8OKxAVrIbFynYn4em3TkWkyCksMcPWo,8344
|
|
95
|
-
unfold/forms.py,sha256=
|
|
95
|
+
unfold/forms.py,sha256=Bno2c1tj7FgY0Q0ItYD3IqX4sQl_sf-AsOzKlumA2vI,8687
|
|
96
96
|
unfold/layout.py,sha256=Q-dFTA6UlvvPCA4PsGyTkHQmBLO7PL56xBfZi-bdt0c,1459
|
|
97
|
-
unfold/mixins/__init__.py,sha256=
|
|
97
|
+
unfold/mixins/__init__.py,sha256=_CK7vkPIOXpo7hnN6Xavc9-3JjCaFYtgqdzXl-0OAbo,285
|
|
98
98
|
unfold/mixins/action_model_admin.py,sha256=h5z1ZqjIdqzSbe-pTrV8Yrw7ipp1OXATLXMjBe9Q6Hk,12332
|
|
99
99
|
unfold/mixins/base_model_admin.py,sha256=rAZspMkeESgSsbyFpubCr4gDbi7SopvT6--stRhqGRI,4777
|
|
100
|
+
unfold/mixins/dataset_model_admin.py,sha256=oEHiwutGaPGdcYvwUsJb8IYPmnJDf9waZ_2KeTFE8Tw,2079
|
|
100
101
|
unfold/overrides.py,sha256=ERVY9boZiXgjDYcTEZcIp7KWoeBZ45VM_zN31yAOjyQ,2922
|
|
101
102
|
unfold/paginator.py,sha256=bZiEY-1kqZy_6CYGs9fHo6WntMgpnFCH-LJPoXkEESk,533
|
|
102
103
|
unfold/sections.py,sha256=Lcg3xCZ76fqjm4vD4x7YdE5VsbTKluL-sX5QTEBlHxA,2379
|
|
103
|
-
unfold/settings.py,sha256=
|
|
104
|
-
unfold/sites.py,sha256=
|
|
104
|
+
unfold/settings.py,sha256=WsCaTH3lNeOwCUTyfvYPWbinyxwrJpJ9rXHDtjhZGTM,3454
|
|
105
|
+
unfold/sites.py,sha256=clcgZ7RWIIBGhUvV37SxZpp0uXFFpMfY1WemJKSFzU4,21498
|
|
106
|
+
unfold/static/admin/js/actions.js,sha256=evjnEwMKmI4Xcw_W1nMMAArCtAbAJnqx1BXmX7OBQug,7977
|
|
105
107
|
unfold/static/admin/js/admin/RelatedObjectLookups.js,sha256=ubKKhWmX_QborwPnaLHuQshTwQw6tK1pAViWdKIjw4E,9222
|
|
106
108
|
unfold/static/admin/js/inlines.js,sha256=UXtFzCWHZWIJbxRghlNsNsz8HuRHjcaH1Mvb5e6uJms,16222
|
|
107
109
|
unfold/static/unfold/css/simplebar/LICENSE,sha256=okNJf6UFl2NrEiC4iqORNBa16IKgUgV88acdcl9FbtY,1081
|
|
108
110
|
unfold/static/unfold/css/simplebar/simplebar.css,sha256=5LLaEM11pKi6JFCOLt4XKuZxTpT9rpdq_tNlaQytFlU,4647
|
|
109
|
-
unfold/static/unfold/css/styles.css,sha256=
|
|
111
|
+
unfold/static/unfold/css/styles.css,sha256=CBvEiY0xHXKyZUCWBsNIb-xam7t_7xFdxP8ENEZIT54,200460
|
|
110
112
|
unfold/static/unfold/fonts/inter/Inter-Bold.woff2,sha256=-oiBJ7baAVtlVp8DUfO1w5GtkokElR8cIOn4RiqNleo,114840
|
|
111
113
|
unfold/static/unfold/fonts/inter/Inter-Medium.woff2,sha256=D_PpRhThST61VjFP0keubEqFp3g7TMhr5TmUDPg_Kkg,114348
|
|
112
114
|
unfold/static/unfold/fonts/inter/Inter-Regular.woff2,sha256=4G9rG8VTqupORmgCPtCrChRxKcMQf1Ebx9A9NhsK4IU,111268
|
|
@@ -114,7 +116,7 @@ unfold/static/unfold/fonts/inter/Inter-SemiBold.woff2,sha256=XLcQPk5gWYmv68A9mJx
|
|
|
114
116
|
unfold/static/unfold/fonts/inter/LICENSE,sha256=JiSB6ERSGzJvXs0FPlm5jIstp4yO4b27boF0MF5Uk1o,4380
|
|
115
117
|
unfold/static/unfold/fonts/inter/styles.css,sha256=QqdgevXVfcD6vZGo8ciSkaEG_62_YcZg0hvHTNgJ56E,608
|
|
116
118
|
unfold/static/unfold/fonts/material-symbols/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
117
|
-
unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2,sha256=
|
|
119
|
+
unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2,sha256=NWHJRGrf1tCwi8fCvO0PZJf8UcKjeTC4lb6O5fNu-sg,291696
|
|
118
120
|
unfold/static/unfold/fonts/material-symbols/styles.css,sha256=e9bdHCS0_PeaBQ7BmWkCf-3UqZbASW1tb6EAxukCD7w,164
|
|
119
121
|
unfold/static/unfold/js/alpine/LICENSE,sha256=XwXEkl3T7fBJpwtLQDrA3UOyD3JQHZNZkR3dJdWsZX0,1092
|
|
120
122
|
unfold/static/unfold/js/alpine/alpine.anchor.js,sha256=2Jg9aUq749pjFynzr_H1NK3lf-nXrbHMtO9wvlWJyIQ,15524
|
|
@@ -131,37 +133,38 @@ unfold/static/unfold/js/select2.init.js,sha256=SeUUXgwLi26Tmh1Sgl3al4WeqlvmbZgix
|
|
|
131
133
|
unfold/static/unfold/js/simplebar/LICENSE,sha256=okNJf6UFl2NrEiC4iqORNBa16IKgUgV88acdcl9FbtY,1081
|
|
132
134
|
unfold/static/unfold/js/simplebar/simplebar.js,sha256=t-uG1FAD6ZoiMeN--wac0XRS7SxoDVG6zvRnGuEp7X8,27176
|
|
133
135
|
unfold/styles.css,sha256=4GfTn3K3y-X1xa6w2V6489XqmsxTSOwqtrKlCEaRE6c,21527
|
|
134
|
-
unfold/templates/admin/actions.html,sha256=
|
|
136
|
+
unfold/templates/admin/actions.html,sha256=RqlwNDMQheDTTHLZvvUClcFdfbGPmSvSYcBHKavFDfY,3112
|
|
135
137
|
unfold/templates/admin/app_index.html,sha256=hcXcaEwqKYTaClnGzlBEsTzy3YJn_37AiFs4YVbvX8A,585
|
|
136
138
|
unfold/templates/admin/app_list.html,sha256=-DEZKFdmkdTq3rix_cgZurPZ1r8PHg5pBL3i7ZtzVdI,2972
|
|
137
139
|
unfold/templates/admin/auth/user/add_form.html,sha256=-_YY4guGdAbw2rCskrQfRAAvQF2XzVHt5UMI0fsLDm4,337
|
|
138
140
|
unfold/templates/admin/auth/user/change_password.html,sha256=3NIopJ8JFN4iv428kUTqRthZvmden9sb0-D7AKohRjA,1577
|
|
139
141
|
unfold/templates/admin/base.html,sha256=CuttiTMMtEiPNIEv4VXt27UGITgqPZaz5V8BJlBEOdk,1663
|
|
140
142
|
unfold/templates/admin/base_site.html,sha256=UOsecaCycpyn_ygJNIKO7MQtDFJuHv--r83-mzaVY30,300
|
|
141
|
-
unfold/templates/admin/change_form.html,sha256=
|
|
143
|
+
unfold/templates/admin/change_form.html,sha256=Ir0TOUElOZCzNI-iplOAMRz8OZ-W76sDsD6ztn13tlA,5005
|
|
142
144
|
unfold/templates/admin/change_form_object_tools.html,sha256=eyeH-i2HgEM0Yi-OJA2D1VnKJyC19A_my1IDGxxoP8Y,593
|
|
143
|
-
unfold/templates/admin/change_list.html,sha256=
|
|
145
|
+
unfold/templates/admin/change_list.html,sha256=8sqmJ7ZSXYB2x2IQDhC78BZR5smhKioOeTZtVIOb0iA,4523
|
|
144
146
|
unfold/templates/admin/change_list_object_tools.html,sha256=cmMiT2nT20Ph5yfpj9aHPr76Z-JP4aSXp0o-Rnad28s,147
|
|
145
|
-
unfold/templates/admin/change_list_results.html,sha256=
|
|
147
|
+
unfold/templates/admin/change_list_results.html,sha256=n56FDtmFuNq9Zsd5wNyzBqHWBnwY9TN66x92pBFEz-c,5081
|
|
148
|
+
unfold/templates/admin/dataset_actions.html,sha256=5THF5nONRySRY3iiMh76OUHyq5ay3YqbR3WKhGkxAeo,2173
|
|
146
149
|
unfold/templates/admin/date_hierarchy.html,sha256=A-sIqBKzZTMqSn3NSHORIL1yTEAqhj4Atff0OvWtqT0,1413
|
|
147
150
|
unfold/templates/admin/delete_confirmation.html,sha256=0vHhrbUAOW8CXfkEB20JoA9qV5xRbyb5xGc1jpWcrN4,3661
|
|
148
151
|
unfold/templates/admin/delete_selected_confirmation.html,sha256=mtRZyZH5xBRk60KktA8PZviAeI3yOH34cS_FDHaZOu0,3401
|
|
149
|
-
unfold/templates/admin/edit_inline/stacked.html,sha256=
|
|
150
|
-
unfold/templates/admin/edit_inline/tabular.html,sha256=
|
|
152
|
+
unfold/templates/admin/edit_inline/stacked.html,sha256=Wus59qcHWXGPFrFpsWclSuBc9h5imNFkjxN7iN7e85s,8042
|
|
153
|
+
unfold/templates/admin/edit_inline/tabular.html,sha256=O3jD5Rul5WD32Cr2_AaNdh4G8sOcJlThkHHz1eHAXsY,2393
|
|
151
154
|
unfold/templates/admin/filter.html,sha256=DEyrLgCWuncS1O1WR0vlt1evGQFvKoZV2pABkHzSoGU,2039
|
|
152
|
-
unfold/templates/admin/includes/fieldset.html,sha256=
|
|
155
|
+
unfold/templates/admin/includes/fieldset.html,sha256=KEJrPMKQCwv8D41lmooSc6KRqTMfIM2fz9UbO-kDYEc,1295
|
|
153
156
|
unfold/templates/admin/includes/object_delete_summary.html,sha256=FgwfapZCKWtnFtTHqh1MRuxxLot4bAw92WCcR_V8ImI,444
|
|
154
157
|
unfold/templates/admin/index.html,sha256=n9uEm32hjM3g5d2hkjRlgwcYcAcmVw6nBVS__h8BIRU,539
|
|
155
158
|
unfold/templates/admin/login.html,sha256=E963dlzjZlkNc6WPJg9DiqijWAhRp1QLVCxFHkRca3g,2468
|
|
156
159
|
unfold/templates/admin/nav_sidebar.html,sha256=NiNcLF-0eZwwv2arsikChzwbH7FTI1vEch427KddFlk,772
|
|
157
160
|
unfold/templates/admin/object_history.html,sha256=4S9xpBtywUdFPUmvAuH2lMOG6jxCFZ-rFZYnhbajkRw,3726
|
|
158
161
|
unfold/templates/admin/pagination.html,sha256=-9kjc_lKEeqvDVHMrnTfnlXDxMSkM8GNRGZGuI9D8os,912
|
|
159
|
-
unfold/templates/admin/search_form.html,sha256=
|
|
162
|
+
unfold/templates/admin/search_form.html,sha256=MsV5ZYAoWL0AE8-frQjKROPhmTpf9mXl72dDwDvGkQ0,1899
|
|
160
163
|
unfold/templates/admin/submit_line.html,sha256=9FDZ5HOfiJG11HSMtA4rfqjKe3ucC-_OChpx1CGTLac,4626
|
|
161
164
|
unfold/templates/auth/widgets/read_only_password_hash.html,sha256=MlaNXJ2PLEbv8Nd01BBp-AQEfMB13LNxD_DzRemXhCg,775
|
|
162
165
|
unfold/templates/registration/logged_out.html,sha256=ytjIz3abnpERwUp1F8zn89HyrimSrb9wgUna3Iz0CJE,1202
|
|
163
|
-
unfold/templates/registration/password_change_done.html,sha256=
|
|
164
|
-
unfold/templates/registration/password_change_form.html,sha256=
|
|
166
|
+
unfold/templates/registration/password_change_done.html,sha256=fl2fxUc7C2cNr23E3SqMVavJ-HAT9bpFw4XbFovgzSQ,347
|
|
167
|
+
unfold/templates/registration/password_change_form.html,sha256=e0iLRG1DVNEZIYu8Ej9YaNR8WXlzTskl670vdvXx8YM,1780
|
|
165
168
|
unfold/templates/unfold/components/button.html,sha256=oJEamHBxDIjoQ1xqWuJWDMY5ItUo8jpkZrqFp_cCH5U,933
|
|
166
169
|
unfold/templates/unfold/components/card.html,sha256=inSlz0IbriTQwA-I9sAa8A15NAfjqOWRka28vB-Eu_Q,1565
|
|
167
170
|
unfold/templates/unfold/components/chart/bar.html,sha256=nDdDCUXvFd793OpNgNPQo0vBmvYngMsQyPHVTf1vfOw,297
|
|
@@ -186,14 +189,14 @@ unfold/templates/unfold/helpers/app_list_default.html,sha256=0TR2ZTy0KUqa6YR8Igi
|
|
|
186
189
|
unfold/templates/unfold/helpers/attrs.html,sha256=Mwpj72kuwYj8hOT3J2T8qx6f1r_4xwwaS1slHA-82jI,166
|
|
187
190
|
unfold/templates/unfold/helpers/boolean.html,sha256=zK8xL-fv1rktvUQSYL6O-yGGjpr3w5TDBb3uyw1bF3o,812
|
|
188
191
|
unfold/templates/unfold/helpers/breadcrumb_item.html,sha256=9T6ojN7LOXIlgwSwlIwHgy5U22eQYtarCqcmzsQIoPU,201
|
|
189
|
-
unfold/templates/unfold/helpers/change_list_actions.html,sha256=
|
|
192
|
+
unfold/templates/unfold/helpers/change_list_actions.html,sha256=YtcuNscPnULG0jxTEfx162_QdItDsi4oBoQJXX97Dfw,668
|
|
190
193
|
unfold/templates/unfold/helpers/change_list_filter.html,sha256=WwU-AG4U5qZQ_sFs1z_jaaYBWqIv3ASmtKIQIhAp2gs,1908
|
|
191
194
|
unfold/templates/unfold/helpers/change_list_filter_actions.html,sha256=K99hHgpCLaAHxv-eqIf4nOUfq6CeTQHekEeudKTRYME,2036
|
|
192
195
|
unfold/templates/unfold/helpers/change_list_headers.html,sha256=_pGLbrTuzmlowfydbCEjbKCqCf3z6juhGxMdb8l9j0M,3545
|
|
193
196
|
unfold/templates/unfold/helpers/command.html,sha256=VDy7b6mlDL9kpt2VrCuUQwzjwUOPztUL3hrU2kp0tVs,2885
|
|
194
197
|
unfold/templates/unfold/helpers/command_history.html,sha256=AB5elGPyY51aHuaWnwXddZmdcSadcqBOzdzjYqR4lfU,2866
|
|
195
198
|
unfold/templates/unfold/helpers/command_results.html,sha256=3sYaBePPt9o_WDS9UeZojW-QZzbOGd474r2Elfn_33Q,3679
|
|
196
|
-
unfold/templates/unfold/helpers/dataset.html,sha256=
|
|
199
|
+
unfold/templates/unfold/helpers/dataset.html,sha256=iOuOSqcG20T6_KVcTd8VHIM7Oh03TtmQD4ELSFUXhlU,1286
|
|
197
200
|
unfold/templates/unfold/helpers/delete_submit_line.html,sha256=7SNS0axGytvUih9KxtOzy9ZC5rwG9u99iQxlnUZQfdE,700
|
|
198
201
|
unfold/templates/unfold/helpers/display_dropdown.html,sha256=IpOy8-hww4arAVjPIRsHrip30J3IEd2p-2BzD3BjIaA,2906
|
|
199
202
|
unfold/templates/unfold/helpers/display_header.html,sha256=2u-5Vc3mA6rS3ZlOWm3WRNLUX1wmZy4OSmGY2mdPZYs,1714
|
|
@@ -212,7 +215,7 @@ unfold/templates/unfold/helpers/field_readonly_value_file.html,sha256=1oHAVkn71W
|
|
|
212
215
|
unfold/templates/unfold/helpers/fieldset_row.html,sha256=LriorPLXU4VmqstjX1oBc3T49H8CbhCrRxwQ7YfUSkI,1219
|
|
213
216
|
unfold/templates/unfold/helpers/fieldset_row_checkbox.html,sha256=z4aRab--zJS2PC0jfKPez85IptKGRrqgkPpwW6_IKoo,1467
|
|
214
217
|
unfold/templates/unfold/helpers/fieldset_row_field.html,sha256=cqLT1fHsCCszOHxvYlDFDTAd-6RRoOjdqfdBdhFgHOo,647
|
|
215
|
-
unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=
|
|
218
|
+
unfold/templates/unfold/helpers/fieldsets_tabs.html,sha256=AjNEaC0CB1LlhLtpwiljGESAQGu7KCCYCYOv28va6sg,1793
|
|
216
219
|
unfold/templates/unfold/helpers/form_errors.html,sha256=mrv2_J7RPcLfVtoN1UHh3rfUyOSZpHl67wk1UGqtPcY,266
|
|
217
220
|
unfold/templates/unfold/helpers/form_label.html,sha256=7FfaXfviQmqKpsA1E7NSwM8rJiMNLl9e73XQram0Pfs,249
|
|
218
221
|
unfold/templates/unfold/helpers/header.html,sha256=cHAPz7niLLQDQbrZpURZS1hiA8OYLzkGaqnYzjgv8aE,1151
|
|
@@ -220,6 +223,7 @@ unfold/templates/unfold/helpers/header_back_button.html,sha256=axtIbVUtRZ5gDXL7q
|
|
|
220
223
|
unfold/templates/unfold/helpers/header_title.html,sha256=-H3x6au-ZmMV1Y-HDeOs66MsL0XGKwQxYRnmDGuR268,510
|
|
221
224
|
unfold/templates/unfold/helpers/help_text.html,sha256=fDsSptYt6aPO3xPdMgbpwaINaF1FGFmaOb_1FiS_Bsg,118
|
|
222
225
|
unfold/templates/unfold/helpers/history.html,sha256=qxfCZxFIyl91qDpxfwozhmyVFZwULysA8Y_2H8XJ7bM,1937
|
|
226
|
+
unfold/templates/unfold/helpers/inline_heading.html,sha256=tV2MFa17UGB_SKxwqXMIXesmUXFK4FFx7RjyK1gXwBY,707
|
|
223
227
|
unfold/templates/unfold/helpers/label.html,sha256=miawI37nl0totKxNekRvImHWOG2Og91ozBOny43y8C4,905
|
|
224
228
|
unfold/templates/unfold/helpers/language_form.html,sha256=Ve1qfIcL4DV6cxYfhqGkC_KghDjNyEB8j3hYts1S34M,708
|
|
225
229
|
unfold/templates/unfold/helpers/language_switch.html,sha256=vZiYutLOWChHUQRw1OaHIYVhfzl84-BfZq14FUCKvuo,1225
|
|
@@ -249,7 +253,7 @@ unfold/templates/unfold/helpers/site_logo.html,sha256=S_QJoT2qh0xw0ciaKxoT4GJ6QI
|
|
|
249
253
|
unfold/templates/unfold/helpers/submit.html,sha256=6bfZ7V2PTJfSXGg4K3IEZ42oREkMdAVjfP8yaM8Tu0k,226
|
|
250
254
|
unfold/templates/unfold/helpers/tab_action.html,sha256=mJd87_2qkSNQEwDZZCDkvll5ZbizBkPxWFnBR-kH89o,3431
|
|
251
255
|
unfold/templates/unfold/helpers/tab_actions.html,sha256=koe4D-vm7PRPqZ4FPjo3KEfWARebcpt1KuUJ7oa7PK4,685
|
|
252
|
-
unfold/templates/unfold/helpers/tab_items.html,sha256=
|
|
256
|
+
unfold/templates/unfold/helpers/tab_items.html,sha256=Byz5ESjYPfgB9MBRHidEGRac2G_jyLrnpyIlZ00Hhos,2309
|
|
253
257
|
unfold/templates/unfold/helpers/tab_list.html,sha256=7Jy4QrGfmKq4ORBi9w_Wya_b2QJZOZndvILDaM1unBc,386
|
|
254
258
|
unfold/templates/unfold/helpers/theme_switch.html,sha256=Y46KKpULH_G-fKQuc5LzfSB7Pubcgj_dBJPRMwZoWxE,2408
|
|
255
259
|
unfold/templates/unfold/helpers/unauthenticated_header.html,sha256=nBTHKonEmR87zMAivl48E4c1xOVcTujodn6H9rAf_6U,601
|
|
@@ -302,13 +306,13 @@ unfold/templates/unfold_crispy/uni_form.html,sha256=l9UNCUrIycgJ0p_B6qhtO_YxdARy
|
|
|
302
306
|
unfold/templates/unfold_crispy/whole_uni_form.html,sha256=ufXRKCIGqkqKFOsh166rpKUnHpFMyBV4eYUCRhs3iws,475
|
|
303
307
|
unfold/templates/unfold_crispy/whole_uni_formset.html,sha256=CYksfG2hRUdi5n691KW2ih-FfBxpOU4qVBfbOvcu1zs,873
|
|
304
308
|
unfold/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
305
|
-
unfold/templatetags/unfold.py,sha256=
|
|
306
|
-
unfold/templatetags/unfold_list.py,sha256=
|
|
309
|
+
unfold/templatetags/unfold.py,sha256=VsO7j7PlwbvFkHMlGwmvkU8WLeUxk0ON9xDYosiMB8Q,23334
|
|
310
|
+
unfold/templatetags/unfold_list.py,sha256=7bdseJ9WS5cyE8fQq2wtnm9F7YQXGWPTxx9pb15SzCE,16401
|
|
307
311
|
unfold/typing.py,sha256=N3W54YqV2Kig0y3sP2gHKM4ZuHxpzYe2L9J4ve9rnPg,651
|
|
308
312
|
unfold/utils.py,sha256=qNwL3Wsv3u8nzB5l9PXAXRp6w4p4qXDbQHJAScbXSy4,6804
|
|
309
313
|
unfold/views.py,sha256=4hnLureeD-5xVABO-EDFPoGHpmtOgAuyB7cE4QLkfos,2255
|
|
310
|
-
unfold/widgets.py,sha256=
|
|
311
|
-
django_unfold-0.
|
|
312
|
-
django_unfold-0.
|
|
313
|
-
django_unfold-0.
|
|
314
|
-
django_unfold-0.
|
|
314
|
+
unfold/widgets.py,sha256=3kZ59Qeq0Vh3sOgcaeFvUbBB9cPBkjP712kyd8GusBc,24646
|
|
315
|
+
django_unfold-0.69.0.dist-info/METADATA,sha256=8Cgm7j9IlmsCMI8hic7VQEj_yER9tOeBOwZDIecHSMk,9318
|
|
316
|
+
django_unfold-0.69.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
317
|
+
django_unfold-0.69.0.dist-info/licenses/LICENSE.md,sha256=Ltk_quRyyvV3J5v3brtOqmibeZSw2Hrb8bY1W3ya0Ik,1077
|
|
318
|
+
django_unfold-0.69.0.dist-info/RECORD,,
|
unfold/admin.py
CHANGED
|
@@ -7,8 +7,6 @@ from django.contrib.admin import StackedInline as BaseStackedInline
|
|
|
7
7
|
from django.contrib.admin import TabularInline as BaseTabularInline
|
|
8
8
|
from django.contrib.admin import display, helpers
|
|
9
9
|
from django.contrib.admin.options import InlineModelAdmin
|
|
10
|
-
from django.contrib.admin.views import main
|
|
11
|
-
from django.contrib.admin.views.main import IGNORED_PARAMS
|
|
12
10
|
from django.contrib.contenttypes.admin import (
|
|
13
11
|
GenericStackedInline as BaseGenericStackedInline,
|
|
14
12
|
)
|
|
@@ -31,7 +29,11 @@ from unfold.forms import (
|
|
|
31
29
|
PaginationGenericInlineFormSet,
|
|
32
30
|
PaginationInlineFormSet,
|
|
33
31
|
)
|
|
34
|
-
from unfold.mixins import
|
|
32
|
+
from unfold.mixins import (
|
|
33
|
+
ActionModelAdminMixin,
|
|
34
|
+
BaseModelAdminMixin,
|
|
35
|
+
DatasetModelAdminMixin,
|
|
36
|
+
)
|
|
35
37
|
from unfold.overrides import FORMFIELD_OVERRIDES_INLINE
|
|
36
38
|
from unfold.typing import FieldsetsType
|
|
37
39
|
from unfold.views import ChangeList
|
|
@@ -46,7 +48,9 @@ checkbox = UnfoldBooleanWidget(
|
|
|
46
48
|
)
|
|
47
49
|
|
|
48
50
|
|
|
49
|
-
class ModelAdmin(
|
|
51
|
+
class ModelAdmin(
|
|
52
|
+
BaseModelAdminMixin, ActionModelAdminMixin, DatasetModelAdminMixin, BaseModelAdmin
|
|
53
|
+
):
|
|
50
54
|
action_form = ActionForm
|
|
51
55
|
custom_urls = ()
|
|
52
56
|
add_fieldsets = ()
|
|
@@ -100,39 +104,6 @@ class ModelAdmin(BaseModelAdminMixin, ActionModelAdminMixin, BaseModelAdmin):
|
|
|
100
104
|
|
|
101
105
|
return super().changelist_view(request, extra_context)
|
|
102
106
|
|
|
103
|
-
def changeform_view(
|
|
104
|
-
self,
|
|
105
|
-
request: HttpRequest,
|
|
106
|
-
object_id: str | None = None,
|
|
107
|
-
form_url: str = "",
|
|
108
|
-
extra_context: dict[str, Any] | None = None,
|
|
109
|
-
) -> TemplateResponse:
|
|
110
|
-
self.request = request
|
|
111
|
-
extra_context = extra_context or {}
|
|
112
|
-
datasets = self.get_changeform_datasets(request)
|
|
113
|
-
|
|
114
|
-
# Monkeypatch IGNORED_PARAMS to add dataset page and search arguments into ignored params
|
|
115
|
-
ignored_params = []
|
|
116
|
-
for dataset in datasets:
|
|
117
|
-
ignored_params.append(f"{dataset.model._meta.model_name}-q")
|
|
118
|
-
ignored_params.append(f"{dataset.model._meta.model_name}-p")
|
|
119
|
-
|
|
120
|
-
main.IGNORED_PARAMS = (*IGNORED_PARAMS, *ignored_params)
|
|
121
|
-
|
|
122
|
-
rendered_datasets = []
|
|
123
|
-
for dataset in datasets:
|
|
124
|
-
rendered_datasets.append(
|
|
125
|
-
dataset(
|
|
126
|
-
request=request,
|
|
127
|
-
extra_context={
|
|
128
|
-
"object": object_id,
|
|
129
|
-
},
|
|
130
|
-
)
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
extra_context["datasets"] = rendered_datasets
|
|
134
|
-
return super().changeform_view(request, object_id, form_url, extra_context)
|
|
135
|
-
|
|
136
107
|
def get_list_display(self, request: HttpRequest) -> list[str]:
|
|
137
108
|
list_display = super().get_list_display(request)
|
|
138
109
|
|
unfold/datasets.py
CHANGED
|
@@ -23,16 +23,29 @@ class BaseDataset:
|
|
|
23
23
|
|
|
24
24
|
@property
|
|
25
25
|
def contents(self) -> str:
|
|
26
|
+
if self.model_admin_instance.get_actions(self.request):
|
|
27
|
+
action_form = self.model_admin_instance.action_form(auto_id=None)
|
|
28
|
+
action_form.fields[
|
|
29
|
+
"action"
|
|
30
|
+
].choices = self.model_admin_instance.get_action_choices(self.request)
|
|
31
|
+
else:
|
|
32
|
+
action_form = None
|
|
33
|
+
|
|
26
34
|
return render_to_string(
|
|
27
35
|
"unfold/helpers/dataset.html",
|
|
28
36
|
request=self.request,
|
|
29
37
|
context={
|
|
30
38
|
"dataset": self,
|
|
31
|
-
"
|
|
39
|
+
"id": self.id,
|
|
40
|
+
"cl": self.cl,
|
|
41
|
+
"tab": self.tab,
|
|
32
42
|
"opts": self.model._meta,
|
|
43
|
+
"action_form": action_form,
|
|
44
|
+
"actions_selection_counter": True,
|
|
33
45
|
},
|
|
34
46
|
)
|
|
35
47
|
|
|
48
|
+
@property
|
|
36
49
|
def cl(self) -> DatasetChangeList:
|
|
37
50
|
list_display = self.model_admin_instance.get_list_display(self.request)
|
|
38
51
|
list_display_links = self.model_admin_instance.get_list_display_links(
|
|
@@ -40,6 +53,10 @@ class BaseDataset:
|
|
|
40
53
|
)
|
|
41
54
|
sortable_by = self.model_admin_instance.get_sortable_by(self.request)
|
|
42
55
|
search_fields = self.model_admin_instance.get_search_fields(self.request)
|
|
56
|
+
|
|
57
|
+
if self.model_admin_instance.get_actions(self.request):
|
|
58
|
+
list_display = ["action_checkbox", *list_display]
|
|
59
|
+
|
|
43
60
|
cl = DatasetChangeList(
|
|
44
61
|
request=self.request,
|
|
45
62
|
model=self.model,
|
|
@@ -60,6 +77,10 @@ class BaseDataset:
|
|
|
60
77
|
|
|
61
78
|
return cl
|
|
62
79
|
|
|
80
|
+
@property
|
|
81
|
+
def id(self) -> str:
|
|
82
|
+
return self.__class__.__name__
|
|
83
|
+
|
|
63
84
|
@property
|
|
64
85
|
def model_name(self) -> str:
|
|
65
86
|
return self.model._meta.model_name
|
unfold/forms.py
CHANGED
|
@@ -53,20 +53,20 @@ class ActionForm(forms.Form):
|
|
|
53
53
|
{
|
|
54
54
|
"class": " ".join(
|
|
55
55
|
[
|
|
56
|
-
"appearance-none",
|
|
57
|
-
"
|
|
58
|
-
"font-medium",
|
|
59
|
-
"grow",
|
|
60
|
-
"px-3",
|
|
61
|
-
"py-2",
|
|
62
|
-
"pr-8",
|
|
63
|
-
"rounded-default",
|
|
64
|
-
"
|
|
65
|
-
"truncate",
|
|
66
|
-
"
|
|
67
|
-
"dark:!outline-primary-700",
|
|
68
|
-
"
|
|
69
|
-
"lg:w-72",
|
|
56
|
+
"group-[.changelist-actions]:appearance-none",
|
|
57
|
+
"group-[.changelist-actions]:!bg-white/20",
|
|
58
|
+
"group-[.changelist-actions]:font-medium",
|
|
59
|
+
"group-[.changelist-actions]:grow",
|
|
60
|
+
"group-[.changelist-actions]:px-3",
|
|
61
|
+
"group-[.changelist-actions]:py-2",
|
|
62
|
+
"group-[.changelist-actions]:pr-8",
|
|
63
|
+
"group-[.changelist-actions]:rounded-default",
|
|
64
|
+
"group-[.changelist-actions]:!text-current",
|
|
65
|
+
"group-[.changelist-actions]:truncate",
|
|
66
|
+
"group-[.changelist-actions]:!outline-primary-400",
|
|
67
|
+
"group-[.changelist-actions]:dark:!outline-primary-700",
|
|
68
|
+
"group-[.changelist-actions]:*:text-base-700",
|
|
69
|
+
"group-[.changelist-actions]:lg:w-72",
|
|
70
70
|
]
|
|
71
71
|
),
|
|
72
72
|
"aria-label": _("Select action to run"),
|
|
@@ -79,7 +79,12 @@ class ActionForm(forms.Form):
|
|
|
79
79
|
label="",
|
|
80
80
|
required=False,
|
|
81
81
|
initial=0,
|
|
82
|
-
widget=forms.HiddenInput(
|
|
82
|
+
widget=forms.HiddenInput(
|
|
83
|
+
{
|
|
84
|
+
"class": "select-across",
|
|
85
|
+
"x-model": "selectAcross",
|
|
86
|
+
}
|
|
87
|
+
),
|
|
83
88
|
)
|
|
84
89
|
|
|
85
90
|
|
|
@@ -92,6 +97,8 @@ class AuthenticationForm(AdminAuthenticationForm):
|
|
|
92
97
|
) -> None:
|
|
93
98
|
super().__init__(request, *args, **kwargs)
|
|
94
99
|
|
|
100
|
+
self.fields["username"].widget.attrs["autofocus"] = ""
|
|
101
|
+
|
|
95
102
|
self.fields["username"].widget.attrs["class"] = " ".join(BASE_INPUT_CLASSES)
|
|
96
103
|
self.fields["password"].widget.attrs["class"] = " ".join(BASE_INPUT_CLASSES)
|
|
97
104
|
|
unfold/mixins/__init__.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from unfold.mixins.action_model_admin import ActionModelAdminMixin
|
|
2
2
|
from unfold.mixins.base_model_admin import BaseModelAdminMixin
|
|
3
|
+
from unfold.mixins.dataset_model_admin import DatasetModelAdminMixin
|
|
3
4
|
|
|
4
|
-
__all__ = ["BaseModelAdminMixin", "ActionModelAdminMixin"]
|
|
5
|
+
__all__ = ["BaseModelAdminMixin", "ActionModelAdminMixin", "DatasetModelAdminMixin"]
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from django.contrib.admin import helpers
|
|
4
|
+
from django.contrib.admin.views import main
|
|
5
|
+
from django.contrib.admin.views.main import IGNORED_PARAMS
|
|
6
|
+
from django.http import HttpRequest
|
|
7
|
+
from django.template.response import TemplateResponse
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DatasetModelAdminMixin:
|
|
11
|
+
def changeform_view(
|
|
12
|
+
self,
|
|
13
|
+
request: HttpRequest,
|
|
14
|
+
object_id: str | None = None,
|
|
15
|
+
form_url: str = "",
|
|
16
|
+
extra_context: dict[str, Any] | None = None,
|
|
17
|
+
) -> TemplateResponse:
|
|
18
|
+
self.request = request
|
|
19
|
+
extra_context = extra_context or {}
|
|
20
|
+
datasets = self.get_changeform_datasets(request)
|
|
21
|
+
|
|
22
|
+
# Monkeypatch IGNORED_PARAMS to add dataset page and search arguments into ignored params
|
|
23
|
+
ignored_params = []
|
|
24
|
+
for dataset in datasets:
|
|
25
|
+
ignored_params.append(f"{dataset.model._meta.model_name}-q")
|
|
26
|
+
ignored_params.append(f"{dataset.model._meta.model_name}-p")
|
|
27
|
+
|
|
28
|
+
main.IGNORED_PARAMS = (*IGNORED_PARAMS, *ignored_params)
|
|
29
|
+
|
|
30
|
+
rendered_datasets = []
|
|
31
|
+
for dataset in datasets:
|
|
32
|
+
rendered_datasets.append(
|
|
33
|
+
dataset(
|
|
34
|
+
request=request,
|
|
35
|
+
extra_context={
|
|
36
|
+
"object": object_id,
|
|
37
|
+
},
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
extra_context["datasets"] = rendered_datasets
|
|
42
|
+
selected = request.POST.getlist(helpers.ACTION_CHECKBOX_NAME)
|
|
43
|
+
|
|
44
|
+
if (
|
|
45
|
+
request.method == "POST"
|
|
46
|
+
and selected
|
|
47
|
+
and "dataset" in request.POST
|
|
48
|
+
and helpers.ACTION_CHECKBOX_NAME in request.POST
|
|
49
|
+
):
|
|
50
|
+
dataset = None
|
|
51
|
+
for item in rendered_datasets:
|
|
52
|
+
if item.id == request.POST["dataset"]:
|
|
53
|
+
dataset = item
|
|
54
|
+
|
|
55
|
+
response = dataset.model_admin_instance.response_action(
|
|
56
|
+
request, queryset=dataset.cl.get_queryset(request)
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if response:
|
|
60
|
+
return response
|
|
61
|
+
|
|
62
|
+
return super().changeform_view(request, object_id, form_url, extra_context)
|
unfold/settings.py
CHANGED
unfold/sites.py
CHANGED
|
@@ -47,7 +47,11 @@ class UnfoldAdminSite(AdminSite):
|
|
|
47
47
|
|
|
48
48
|
super().__init__(name)
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
custom_login_form = get_config(self.settings_name)["LOGIN"]["form"]
|
|
51
|
+
|
|
52
|
+
if custom_login_form is not None:
|
|
53
|
+
self.login_form = import_string(custom_login_form)
|
|
54
|
+
elif self.login_form is None:
|
|
51
55
|
self.login_form = AuthenticationForm
|
|
52
56
|
|
|
53
57
|
def get_urls(self) -> list[URLPattern]:
|