django-unfold 0.49.0__tar.gz → 0.50.0__tar.gz
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/PKG-INFO +81 -0
- django_unfold-0.50.0/README.md +56 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/pyproject.toml +1 -1
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/admin.py +4 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/dropdown_filters.py +1 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/mixins.py +10 -4
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/forms.py +2 -2
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/dataclasses.py +3 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/decorators.py +8 -0
- django_unfold-0.50.0/src/unfold/enums.py +10 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/mixins/action_model_admin.py +22 -17
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/settings.py +1 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/sites.py +3 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/admin/js/inlines.js +18 -5
- django_unfold-0.50.0/src/unfold/static/unfold/css/styles.css +1 -0
- django_unfold-0.50.0/src/unfold/static/unfold/js/select2.init.js +44 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/styles.css +1 -1
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/change_list.html +16 -16
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/change_list_results.html +2 -34
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/filter.html +1 -1
- django_unfold-0.50.0/src/unfold/templates/unfold/helpers/empty_results.html +35 -0
- django_unfold-0.50.0/src/unfold/templates/unfold/helpers/tab_action.html +43 -0
- django_unfold-0.50.0/src/unfold/templates/unfold/helpers/tab_actions.html +19 -0
- django_unfold-0.50.0/src/unfold/templates/unfold/helpers/tab_items.html +47 -0
- django_unfold-0.50.0/src/unfold/templates/unfold/helpers/tab_list.html +11 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/layouts/skeleton.html +1 -2
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templatetags/unfold.py +70 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/views.py +14 -1
- django_unfold-0.49.0/PKG-INFO +0 -75
- django_unfold-0.49.0/README.md +0 -50
- django_unfold-0.49.0/src/unfold/contrib/filters/admin.py +0 -619
- django_unfold-0.49.0/src/unfold/static/unfold/css/styles.css +0 -1
- django_unfold-0.49.0/src/unfold/static/unfold/js/select2.init.js +0 -15
- django_unfold-0.49.0/src/unfold/templates/unfold/helpers/tab_action.html +0 -38
- django_unfold-0.49.0/src/unfold/templates/unfold/helpers/tab_list.html +0 -74
- {django_unfold-0.49.0 → django_unfold-0.50.0}/LICENSE.md +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/checks.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/components.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/autocomplete_filters.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/datetime_filters.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/numeric_filters.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/text_filters.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/static/unfold/filters/css/nouislider.min.css +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/static/unfold/filters/js/DateTimeShortcuts.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/static/unfold/filters/js/admin-numeric-filter.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/static/unfold/filters/js/nouislider.min.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/static/unfold/filters/js/wNumb.min.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_date_range.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_field.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_numeric_range.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/static/unfold/forms/css/trix.css +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/static/unfold/forms/js/trix.config.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/static/unfold/forms/js/trix.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/templates/unfold/forms/array.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/templates/unfold/forms/wysiwyg.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/forms/widgets.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/change_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/field.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/unfold/guardian/group_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/guardian/templates/unfold/guardian/user_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/forms.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/base.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_export.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_export_item.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_import_export.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_import_item.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/export.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/import.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_errors.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_preview.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_validation.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/import_export/templates/admin/import_export/resource_fields_list.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/inlines/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/inlines/admin.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/inlines/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/inlines/checks.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/inlines/forms.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/simple_history/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/simple_history/apps.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/simple_history/templates/simple_history/object_history.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/simple_history/templates/simple_history/object_history_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/simple_history/templates/simple_history/object_history_list.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/simple_history/templates/simple_history/submit_line.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/exceptions.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/fields.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/forms.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/mixins/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/mixins/base_model_admin.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/overrides.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/admin/js/admin/RelatedObjectLookups.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/css/simplebar.css +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/inter/Inter-Bold.woff2 +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/inter/Inter-Medium.woff2 +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/inter/Inter-Regular.woff2 +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/inter/Inter-SemiBold.woff2 +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/inter/styles.css +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2 +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/fonts/material-symbols/styles.css +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/alpine.anchor.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/alpine.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/alpine.persist.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/alpine.resize.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/alpine.sort.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/app.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/chart.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/htmx.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/static/unfold/js/simplebar.js +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/actions.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/app_index.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/app_list.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/auth/user/add_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/auth/user/change_password.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/base.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/base_site.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/change_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/change_form_object_tools.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/change_list_object_tools.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/date_hierarchy.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/delete_confirmation.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/delete_selected_confirmation.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/edit_inline/stacked.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/edit_inline/tabular.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/includes/fieldset.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/includes/object_delete_summary.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/index.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/login.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/nav_sidebar.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/object_history.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/pagination.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/search_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/admin/submit_line.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/auth/widgets/read_only_password_hash.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/registration/logged_out.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/registration/password_change_done.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/registration/password_change_form.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/button.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/card.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/chart/bar.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/chart/cohort.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/chart/line.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/container.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/flex.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/icon.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/navigation.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/progress.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/separator.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/table.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/text.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/title.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/components/tracker.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/account_links.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/actions_row.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/add_link.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/app_list.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/app_list_default.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/attrs.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/boolean.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/breadcrumb_item.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/change_list_actions.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/change_list_filter.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/change_list_filter_actions.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/delete_submit_line.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/display_header.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/display_label.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/edit_inline/tabular_delete.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/edit_inline/tabular_error.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/edit_inline/tabular_field.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/edit_inline/tabular_heading.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/edit_inline/tabular_row.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/edit_inline/tabular_title.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/field.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/field_readonly.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/field_readonly_value.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/fieldset_row.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/fieldset_row_checkbox.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/fieldset_row_field.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/fieldsets_tabs.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/form_errors.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/form_label.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/header.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/header_back_button.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/help_text.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/history.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/label.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/language_switch.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages/debug.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages/error.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages/errornote.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages/info.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages/success.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages/warning.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/messages.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/navigation.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/navigation_header.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/pagination_current_item.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/pagination_ellipsis.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/search.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/search_results.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/site_branding.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/site_dropdown.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/site_icon.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/site_logo.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/submit.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/theme_switch.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/userlinks.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/helpers/welcomemsg.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/layouts/base.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/layouts/base_simple.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/templatetags/preserve_changelist_filters.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/clearable_file_input.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/clearable_file_input_small.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/date.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/foreign_key_raw_id.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/radio.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/radio_option.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/range.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/related_widget_wrapper.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/split_datetime.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/split_datetime_vertical.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/split_money.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/textarea.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/textarea_expandable.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/time.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templates/unfold/widgets/url.html +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templatetags/__init__.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/templatetags/unfold_list.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/typing.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/utils.py +0 -0
- {django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/widgets.py +0 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: django-unfold
|
3
|
+
Version: 0.50.0
|
4
|
+
Summary: Modern Django admin theme for seamless interface development
|
5
|
+
License: MIT
|
6
|
+
Keywords: django,admin,tailwind,theme
|
7
|
+
Requires-Python: >=3.9
|
8
|
+
Classifier: Environment :: Web Environment
|
9
|
+
Classifier: Framework :: Django
|
10
|
+
Classifier: Intended Audience :: Developers
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Operating System :: OS Independent
|
13
|
+
Classifier: Programming Language :: Python
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
20
|
+
Requires-Dist: django (>=3.2)
|
21
|
+
Project-URL: Homepage, https://unfoldadmin.com
|
22
|
+
Project-URL: Repository, https://github.com/unfoldadmin/django-unfold
|
23
|
+
Description-Content-Type: text/markdown
|
24
|
+
|
25
|
+

|
26
|
+
|
27
|
+
## Unfold Django Admin Theme
|
28
|
+
|
29
|
+
[](https://pypi.org/project/django-unfold/)
|
30
|
+
[](https://github.com/unfoldadmin/django-unfold/actions?query=workflow%3Arelease)
|
31
|
+

|
32
|
+

|
33
|
+
|
34
|
+
Transform your Django admin into a powerful, modern administrative interface with Unfold. This open-source theme enhances Django's default admin with beautiful design, advanced features, and developer-friendly customization options. Built on proven best practices, Unfold seamlessly integrates with your existing Django admin while providing all the tools needed to create sophisticated administrative areas that both developers and end-users will love.
|
35
|
+
|
36
|
+
- **Documentation:** The full documentation is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
37
|
+
- **Unfold:** The demo site is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
38
|
+
- **Formula:** A repository with a demo implementation is available at [github.com/unfoldadmin/formula](https://github.com/unfoldadmin/formula?utm_medium=github&utm_source=unfold).
|
39
|
+
- **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).
|
40
|
+
- **Discord:** Join our Unfold community on [Discord](https://discord.gg/9sQj9MEbNz).
|
41
|
+
|
42
|
+
## Django & Unfold Development Services
|
43
|
+
|
44
|
+
Need assistance with implementing Unfold or require custom Django development? Professional consulting and development services are available to help transform your Django admin interface and enhance your web applications. Whether migrating from the native Django admin to Unfold or seeking expert technical guidance, reach out to discuss your project requirements and explore development possibilities. [Get in touch](https://unfoldadmin.com/consulting?utm_medium=github&utm_source=unfold) to learn more about available services.
|
45
|
+
|
46
|
+
## Fresh Features & Enhancements
|
47
|
+
|
48
|
+
- **Autocomplete filters:** Enhance filter functionality with built-in autocomplete support
|
49
|
+
- **Site dropdown:** Configurable dropdown menu in the header area for managing custom navigation links
|
50
|
+
- **Dropdown actions:** Organize action items in customizable dropdown menus
|
51
|
+
- **Custom tab navigation:** Create flexible, structured tab navigation with customizable routing
|
52
|
+
|
53
|
+
|
54
|
+
## Core Features & Capabilities
|
55
|
+
|
56
|
+
- **Visual Interface**: Provides a modern user interface based on the Tailwind CSS framework.
|
57
|
+
- **Sidebar Navigation**: Simplifies the creation of sidebar menus with icons, collapsible sections, and more.
|
58
|
+
- **Dark Mode Support**: Includes both light and dark mode themes.
|
59
|
+
- **Flexible Actions**: Provides multiple ways to define actions throughout the admin interface.
|
60
|
+
- **Advanced Filters**: Features custom dropdowns, autocomplete, numeric, datetime, and text field filters.
|
61
|
+
- **Dashboard Tools**: Includes helpers for building custom dashboard pages.
|
62
|
+
- **UI Components**: Offers reusable interface components such as cards, buttons, and charts.
|
63
|
+
- **WYSIWYG Editor**: Built-in support for WYSIWYG editing through Trix.
|
64
|
+
- **Array widget:** Built-in widget for `django.contrib.postgres.fields.ArrayField`
|
65
|
+
- **Inline tabs:** Group inlines into tab navigation in the change form
|
66
|
+
- **Model tabs:** Allow defining custom tab navigation for models
|
67
|
+
- **Fieldset tabs:** Merge multiple fieldsets into tabs in the change form
|
68
|
+
- **Sortable inlines:** Allow sorting inlines by dragging and dropping
|
69
|
+
- **Environment label:** Distinguish between environments by displaying a label
|
70
|
+
- **Nonrelated inlines:** Display nonrelated models as inlines in the change form
|
71
|
+
- **Favicons:** Built-in support for configuring various site favicons
|
72
|
+
- **Themes:** Allow customization of color scheme, background color, border radius, and more
|
73
|
+
- **Font colors:** Adjust font colors for better readability
|
74
|
+
- **Changeform modes:** Display fields in compressed mode in the change form
|
75
|
+
- **Language switcher:** Allow changing language directly from the admin area
|
76
|
+
- **Parallel admin:** Supports [running the default admin](https://unfoldadmin.com/blog/migrating-django-admin-unfold/?utm_medium=github&utm_source=unfold) alongside Unfold.
|
77
|
+
- **Third-party packages:** Provides default support for multiple popular applications.
|
78
|
+
- **Configuration:** Allows basic options to be changed in `settings.py`.
|
79
|
+
- **Dependencies:** Built entirely on `django.contrib.admin`.
|
80
|
+
- **VS Code:** Project configuration and development container included.
|
81
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
## Unfold Django Admin Theme
|
4
|
+
|
5
|
+
[](https://pypi.org/project/django-unfold/)
|
6
|
+
[](https://github.com/unfoldadmin/django-unfold/actions?query=workflow%3Arelease)
|
7
|
+

|
8
|
+

|
9
|
+
|
10
|
+
Transform your Django admin into a powerful, modern administrative interface with Unfold. This open-source theme enhances Django's default admin with beautiful design, advanced features, and developer-friendly customization options. Built on proven best practices, Unfold seamlessly integrates with your existing Django admin while providing all the tools needed to create sophisticated administrative areas that both developers and end-users will love.
|
11
|
+
|
12
|
+
- **Documentation:** The full documentation is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
13
|
+
- **Unfold:** The demo site is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
14
|
+
- **Formula:** A repository with a demo implementation is available at [github.com/unfoldadmin/formula](https://github.com/unfoldadmin/formula?utm_medium=github&utm_source=unfold).
|
15
|
+
- **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).
|
16
|
+
- **Discord:** Join our Unfold community on [Discord](https://discord.gg/9sQj9MEbNz).
|
17
|
+
|
18
|
+
## Django & Unfold Development Services
|
19
|
+
|
20
|
+
Need assistance with implementing Unfold or require custom Django development? Professional consulting and development services are available to help transform your Django admin interface and enhance your web applications. Whether migrating from the native Django admin to Unfold or seeking expert technical guidance, reach out to discuss your project requirements and explore development possibilities. [Get in touch](https://unfoldadmin.com/consulting?utm_medium=github&utm_source=unfold) to learn more about available services.
|
21
|
+
|
22
|
+
## Fresh Features & Enhancements
|
23
|
+
|
24
|
+
- **Autocomplete filters:** Enhance filter functionality with built-in autocomplete support
|
25
|
+
- **Site dropdown:** Configurable dropdown menu in the header area for managing custom navigation links
|
26
|
+
- **Dropdown actions:** Organize action items in customizable dropdown menus
|
27
|
+
- **Custom tab navigation:** Create flexible, structured tab navigation with customizable routing
|
28
|
+
|
29
|
+
|
30
|
+
## Core Features & Capabilities
|
31
|
+
|
32
|
+
- **Visual Interface**: Provides a modern user interface based on the Tailwind CSS framework.
|
33
|
+
- **Sidebar Navigation**: Simplifies the creation of sidebar menus with icons, collapsible sections, and more.
|
34
|
+
- **Dark Mode Support**: Includes both light and dark mode themes.
|
35
|
+
- **Flexible Actions**: Provides multiple ways to define actions throughout the admin interface.
|
36
|
+
- **Advanced Filters**: Features custom dropdowns, autocomplete, numeric, datetime, and text field filters.
|
37
|
+
- **Dashboard Tools**: Includes helpers for building custom dashboard pages.
|
38
|
+
- **UI Components**: Offers reusable interface components such as cards, buttons, and charts.
|
39
|
+
- **WYSIWYG Editor**: Built-in support for WYSIWYG editing through Trix.
|
40
|
+
- **Array widget:** Built-in widget for `django.contrib.postgres.fields.ArrayField`
|
41
|
+
- **Inline tabs:** Group inlines into tab navigation in the change form
|
42
|
+
- **Model tabs:** Allow defining custom tab navigation for models
|
43
|
+
- **Fieldset tabs:** Merge multiple fieldsets into tabs in the change form
|
44
|
+
- **Sortable inlines:** Allow sorting inlines by dragging and dropping
|
45
|
+
- **Environment label:** Distinguish between environments by displaying a label
|
46
|
+
- **Nonrelated inlines:** Display nonrelated models as inlines in the change form
|
47
|
+
- **Favicons:** Built-in support for configuring various site favicons
|
48
|
+
- **Themes:** Allow customization of color scheme, background color, border radius, and more
|
49
|
+
- **Font colors:** Adjust font colors for better readability
|
50
|
+
- **Changeform modes:** Display fields in compressed mode in the change form
|
51
|
+
- **Language switcher:** Allow changing language directly from the admin area
|
52
|
+
- **Parallel admin:** Supports [running the default admin](https://unfoldadmin.com/blog/migrating-django-admin-unfold/?utm_medium=github&utm_source=unfold) alongside Unfold.
|
53
|
+
- **Third-party packages:** Provides default support for multiple popular applications.
|
54
|
+
- **Configuration:** Allows basic options to be changed in `settings.py`.
|
55
|
+
- **Dependencies:** Built entirely on `django.contrib.admin`.
|
56
|
+
- **VS Code:** Project configuration and development container included.
|
@@ -20,6 +20,7 @@ from unfold.forms import ActionForm
|
|
20
20
|
from unfold.mixins import ActionModelAdminMixin, BaseModelAdminMixin
|
21
21
|
from unfold.overrides import FORMFIELD_OVERRIDES_INLINE
|
22
22
|
from unfold.typing import FieldsetsType
|
23
|
+
from unfold.views import ChangeList
|
23
24
|
from unfold.widgets import UnfoldBooleanWidget
|
24
25
|
|
25
26
|
checkbox = UnfoldBooleanWidget(
|
@@ -168,6 +169,9 @@ class ModelAdmin(BaseModelAdminMixin, ActionModelAdminMixin, BaseModelAdmin):
|
|
168
169
|
return redirect(request.GET["next"])
|
169
170
|
return res
|
170
171
|
|
172
|
+
def get_changelist(self, request, **kwargs):
|
173
|
+
return ChangeList
|
174
|
+
|
171
175
|
|
172
176
|
class TabularInline(BaseModelAdminMixin, BaseTabularInline):
|
173
177
|
formfield_overrides = FORMFIELD_OVERRIDES_INLINE
|
{django_unfold-0.49.0 → django_unfold-0.50.0}/src/unfold/contrib/filters/admin/dropdown_filters.py
RENAMED
@@ -83,6 +83,7 @@ class RelatedDropdownFilter(ValueMixin, DropdownMixin, admin.RelatedFieldListFil
|
|
83
83
|
) -> None:
|
84
84
|
super().__init__(field, request, params, model, model_admin, field_path)
|
85
85
|
self.model_admin = model_admin
|
86
|
+
self.request = request
|
86
87
|
|
87
88
|
def choices(self, changelist: ChangeList) -> Generator[dict[str, Any], None, None]:
|
88
89
|
yield {
|
@@ -4,10 +4,12 @@ from typing import Any, Optional
|
|
4
4
|
from django.contrib.admin.views.main import ChangeList
|
5
5
|
from django.core.validators import EMPTY_VALUES
|
6
6
|
from django.db.models import QuerySet
|
7
|
+
from django.db.models.fields import BLANK_CHOICE_DASH, Field
|
7
8
|
from django.forms import ValidationError
|
8
9
|
from django.http import HttpRequest
|
9
10
|
from django.utils.translation import gettext_lazy as _
|
10
11
|
|
12
|
+
from unfold.admin import ModelAdmin
|
11
13
|
from unfold.contrib.filters.forms import (
|
12
14
|
AutocompleteDropdownForm,
|
13
15
|
DropdownForm,
|
@@ -123,11 +125,15 @@ class RangeNumericMixin:
|
|
123
125
|
|
124
126
|
|
125
127
|
class AutocompleteMixin:
|
126
|
-
def
|
127
|
-
|
128
|
+
def has_output(self) -> bool:
|
129
|
+
return True
|
128
130
|
|
129
|
-
|
130
|
-
|
131
|
+
def field_choices(
|
132
|
+
self, field: Field, request: HttpRequest, model_admin: ModelAdmin
|
133
|
+
) -> list[tuple[str, str]]:
|
134
|
+
return [
|
135
|
+
("", BLANK_CHOICE_DASH),
|
136
|
+
]
|
131
137
|
|
132
138
|
def choices(
|
133
139
|
self, changelist: ChangeList
|
@@ -52,7 +52,7 @@ class AutocompleteDropdownForm(forms.Form):
|
|
52
52
|
self.fields[name] = self.field(
|
53
53
|
label=label,
|
54
54
|
required=False,
|
55
|
-
queryset=field.remote_field.model.objects
|
55
|
+
queryset=field.remote_field.model.objects,
|
56
56
|
widget=self.widget(field, model_admin.admin_site),
|
57
57
|
)
|
58
58
|
|
@@ -61,7 +61,7 @@ class AutocompleteDropdownForm(forms.Form):
|
|
61
61
|
"admin/js/vendor/jquery/jquery.js",
|
62
62
|
"admin/js/vendor/select2/select2.full.js",
|
63
63
|
"admin/js/jquery.init.js",
|
64
|
-
"
|
64
|
+
"unfold/js/select2.init.js",
|
65
65
|
)
|
66
66
|
css = {
|
67
67
|
"screen": (
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
2
|
from typing import Callable, Optional, Union
|
3
3
|
|
4
|
+
from unfold.enums import ActionVariant
|
5
|
+
|
4
6
|
from .typing import ActionFunction
|
5
7
|
|
6
8
|
|
@@ -13,6 +15,7 @@ class UnfoldAction:
|
|
13
15
|
attrs: Optional[dict] = None
|
14
16
|
object_id: Optional[Union[int, str]] = None
|
15
17
|
icon: Optional[str] = None
|
18
|
+
variant: Optional[ActionVariant] = ActionVariant.DEFAULT
|
16
19
|
|
17
20
|
|
18
21
|
@dataclass
|
@@ -7,6 +7,8 @@ from django.db.models import Model
|
|
7
7
|
from django.db.models.expressions import BaseExpression, Combinable
|
8
8
|
from django.http import HttpRequest, HttpResponse
|
9
9
|
|
10
|
+
from unfold.enums import ActionVariant
|
11
|
+
|
10
12
|
from .typing import ActionFunction
|
11
13
|
|
12
14
|
|
@@ -18,6 +20,7 @@ def action(
|
|
18
20
|
url_path: Optional[str] = None,
|
19
21
|
attrs: Optional[dict[str, Any]] = None,
|
20
22
|
icon: Optional[str] = None,
|
23
|
+
variant: Optional[ActionVariant] = ActionVariant.DEFAULT,
|
21
24
|
) -> ActionFunction:
|
22
25
|
def decorator(func: Callable) -> ActionFunction:
|
23
26
|
def inner(
|
@@ -59,6 +62,11 @@ def action(
|
|
59
62
|
if icon is not None:
|
60
63
|
inner.icon = icon
|
61
64
|
|
65
|
+
if variant is not None:
|
66
|
+
inner.variant = variant
|
67
|
+
else:
|
68
|
+
inner.variant = ActionVariant.DEFAULT
|
69
|
+
|
62
70
|
inner.attrs = attrs or {}
|
63
71
|
return inner
|
64
72
|
|
@@ -7,6 +7,7 @@ from django.template.response import TemplateResponse
|
|
7
7
|
from django.urls import reverse
|
8
8
|
|
9
9
|
from unfold.dataclasses import UnfoldAction
|
10
|
+
from unfold.enums import ActionVariant
|
10
11
|
from unfold.exceptions import UnfoldException
|
11
12
|
|
12
13
|
|
@@ -68,24 +69,25 @@ class ActionModelAdminMixin:
|
|
68
69
|
"""
|
69
70
|
extra_context = extra_context or {}
|
70
71
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
self.
|
79
|
-
|
80
|
-
|
81
|
-
|
72
|
+
if object_id:
|
73
|
+
# `actions_submit_line` is a list of actions that are displayed in the submit line they
|
74
|
+
# are displayed as form buttons
|
75
|
+
actions_submit_line = self.get_actions_submit_line(request, object_id)
|
76
|
+
|
77
|
+
# `actions_detail` may contain custom structure with dropdowns so it is needed
|
78
|
+
# to use `_get_actions_navigation` to build the final structure for the template
|
79
|
+
actions_detail = self._get_actions_navigation(
|
80
|
+
self.actions_detail,
|
81
|
+
self.get_actions_detail(request, object_id),
|
82
|
+
object_id,
|
83
|
+
)
|
82
84
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
extra_context.update(
|
86
|
+
{
|
87
|
+
"actions_submit_line": actions_submit_line,
|
88
|
+
"actions_detail": actions_detail,
|
89
|
+
}
|
90
|
+
)
|
89
91
|
|
90
92
|
return super().changeform_view(request, object_id, form_url, extra_context)
|
91
93
|
|
@@ -118,6 +120,7 @@ class ActionModelAdminMixin:
|
|
118
120
|
path=getattr(method, "url_path", action),
|
119
121
|
attrs=method.attrs if hasattr(method, "attrs") else None,
|
120
122
|
icon=method.icon if hasattr(method, "icon") else None,
|
123
|
+
variant=method.variant if hasattr(method, "variant") else None,
|
121
124
|
)
|
122
125
|
|
123
126
|
def get_actions_list(self, request: HttpRequest) -> list[UnfoldAction]:
|
@@ -264,6 +267,7 @@ class ActionModelAdminMixin:
|
|
264
267
|
return {
|
265
268
|
"title": action.description,
|
266
269
|
"icon": action.icon,
|
270
|
+
"variant": action.variant,
|
267
271
|
"attrs": action.method.attrs,
|
268
272
|
"path": get_action_path(action),
|
269
273
|
}
|
@@ -275,6 +279,7 @@ class ActionModelAdminMixin:
|
|
275
279
|
dropdown = {
|
276
280
|
"title": nav_item["title"],
|
277
281
|
"icon": nav_item.get("icon"),
|
282
|
+
"variant": nav_item.get("variant", ActionVariant.DEFAULT),
|
278
283
|
"items": [],
|
279
284
|
}
|
280
285
|
|
@@ -88,6 +88,9 @@ class UnfoldAdminSite(AdminSite):
|
|
88
88
|
"border_radius": self._get_config("BORDER_RADIUS", request),
|
89
89
|
"colors": self._get_colors("COLORS", request),
|
90
90
|
"environment": self._get_config("ENVIRONMENT", request),
|
91
|
+
"environment_title_prefix": self._get_config(
|
92
|
+
"ENVIRONMENT_TITLE_PREFIX", request
|
93
|
+
),
|
91
94
|
"tab_list": self.get_tabs_list(request),
|
92
95
|
"styles": self._get_list("STYLES", request),
|
93
96
|
"scripts": self._get_list("SCRIPTS", request),
|
@@ -225,11 +225,24 @@
|
|
225
225
|
}
|
226
226
|
};
|
227
227
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
.
|
232
|
-
|
228
|
+
// !CHANGED from original. Business logic for tabular inlines is different.
|
229
|
+
if ($this.parent().is("tbody")) {
|
230
|
+
$this
|
231
|
+
.parent()
|
232
|
+
.parent()
|
233
|
+
.find("tr.form-row")
|
234
|
+
.each(function (i) {
|
235
|
+
$(this)
|
236
|
+
.not("." + options.emptyCssClass)
|
237
|
+
.addClass(options.formCssClass);
|
238
|
+
});
|
239
|
+
} else {
|
240
|
+
$this.each(function (i) {
|
241
|
+
$(this)
|
242
|
+
.not("." + options.emptyCssClass)
|
243
|
+
.addClass(options.formCssClass);
|
244
|
+
});
|
245
|
+
}
|
233
246
|
|
234
247
|
// Create the delete buttons for all unsaved inlines:
|
235
248
|
$this
|