django-unfold 0.40.0__tar.gz → 0.42.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {django_unfold-0.40.0 → django_unfold-0.42.0}/PKG-INFO +6 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/README.md +4 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/pyproject.toml +3 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/admin.py +11 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/admin.py +23 -33
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/forms.py +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/templates/unfold/forms/array.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/export.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/import.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/simple_history/templates/simple_history/object_history_form.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/simple_history/templates/simple_history/submit_line.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/settings.py +1 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/sites.py +25 -5
- django_unfold-0.42.0/src/unfold/static/admin/js/inlines.js +439 -0
- django_unfold-0.42.0/src/unfold/static/unfold/css/styles.css +1 -0
- django_unfold-0.42.0/src/unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2 +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/fonts/material-symbols/styles.css +1 -2
- django_unfold-0.42.0/src/unfold/static/unfold/js/alpine.sort.js +1 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/app.js +42 -10
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/select2.init.js +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/styles.css +19 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/app_index.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/auth/user/change_password.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/base.html +4 -4
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/change_form.html +2 -2
- django_unfold-0.42.0/src/unfold/templates/admin/change_list.html +128 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/date_hierarchy.html +5 -5
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/delete_confirmation.html +4 -9
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/delete_selected_confirmation.html +4 -8
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/edit_inline/stacked.html +23 -8
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/edit_inline/tabular.html +44 -21
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/object_history.html +2 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/submit_line.html +8 -8
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/registration/password_change_done.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/registration/password_change_form.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/change_list_filter.html +9 -17
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/account_links.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/actions_row.html +9 -7
- django_unfold-0.42.0/src/unfold/templates/unfold/helpers/delete_submit_line.html +11 -0
- django_unfold-0.42.0/src/unfold/templates/unfold/helpers/display_header.html +30 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/field_readonly.html +1 -1
- django_unfold-0.42.0/src/unfold/templates/unfold/helpers/field_readonly_value.html +1 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/fieldset_row.html +2 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/form_label.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/header.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/label.html +1 -1
- django_unfold-0.42.0/src/unfold/templates/unfold/helpers/language_switch.html +27 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/tab_list.html +3 -3
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/theme_switch.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/userlinks.html +4 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/layouts/base_simple.html +1 -1
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/layouts/skeleton.html +1 -0
- django_unfold-0.42.0/src/unfold/templates/unfold/templatetags/preserve_changelist_filters.html +3 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/split_datetime_vertical.html +1 -1
- django_unfold-0.42.0/src/unfold/templates/unfold/widgets/url.html +9 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templatetags/unfold.py +29 -2
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/utils.py +17 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/widgets.py +6 -2
- django_unfold-0.40.0/src/unfold/static/unfold/css/styles.css +0 -1
- django_unfold-0.40.0/src/unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2 +0 -0
- django_unfold-0.40.0/src/unfold/templates/admin/change_list.html +0 -126
- django_unfold-0.40.0/src/unfold/templates/unfold/helpers/display_header.html +0 -25
- django_unfold-0.40.0/src/unfold/templates/unfold/helpers/field_readonly_value.html +0 -1
- django_unfold-0.40.0/src/unfold/templates/unfold/widgets/url.html +0 -7
- {django_unfold-0.40.0 → django_unfold-0.42.0}/LICENSE.md +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/checks.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/static/unfold/filters/css/nouislider.min.css +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/static/unfold/filters/js/DateTimeShortcuts.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/static/unfold/filters/js/admin-numeric-filter.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/static/unfold/filters/js/nouislider.min.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/static/unfold/filters/js/wNumb.min.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_date_range.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_field.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_numeric_range.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/static/unfold/forms/css/trix.css +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/static/unfold/forms/js/trix.config.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/static/unfold/forms/js/trix.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/templates/unfold/forms/wysiwyg.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/forms/widgets.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/change_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/admin/guardian/model/field.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/unfold/guardian/group_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/guardian/templates/unfold/guardian/user_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/forms.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/base.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_export.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_export_item.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_import_export.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/change_list_import_item.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_errors.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_preview.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/import_validation.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/import_export/templates/admin/import_export/resource_fields_list.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/inlines/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/inlines/admin.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/inlines/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/inlines/checks.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/inlines/forms.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/simple_history/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/simple_history/apps.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/simple_history/templates/simple_history/object_history.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/contrib/simple_history/templates/simple_history/object_history_list.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/dataclasses.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/decorators.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/exceptions.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/fields.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/forms.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/admin/js/admin/RelatedObjectLookups.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/css/simplebar.css +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/fonts/inter/Inter-Bold.woff2 +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/fonts/inter/Inter-Medium.woff2 +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/fonts/inter/Inter-Regular.woff2 +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/fonts/inter/Inter-SemiBold.woff2 +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/fonts/inter/styles.css +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/alpine.anchor.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/alpine.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/alpine.persist.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/chart.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/htmx.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/static/unfold/js/simplebar.js +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/actions.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/app_list.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/auth/user/add_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/base_site.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/change_form_object_tools.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/change_list_object_tools.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/change_list_results.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/filter.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/includes/fieldset.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/includes/object_delete_summary.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/index.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/login.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/nav_sidebar.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/pagination.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/admin/search_form.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/auth/widgets/read_only_password_hash.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/registration/logged_out.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/button.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/card.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/chart/bar.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/chart/line.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/container.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/flex.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/icon.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/navigation.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/progress.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/separator.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/table.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/text.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/components/title.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/add_link.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/app_list.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/app_list_default.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/attrs.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/boolean.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/breadcrumb_item.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/display_label.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/field.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/fieldsets_tabs.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/form_errors.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/help_text.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/history.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/messages/error.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/messages/errornote.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/messages/info.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/messages.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/navigation.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/pagination_current_item.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/pagination_ellipsis.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/search.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/search_results.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/site_icon.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/site_logo.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/submit.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/tab_action.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/helpers/welcomemsg.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/layouts/base.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/clearable_file_input.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/clearable_file_input_small.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/date.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/foreign_key_raw_id.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/radio.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/radio_option.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/range.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/related_widget_wrapper.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/split_datetime.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/split_money.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/textarea.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/textarea_expandable.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templates/unfold/widgets/time.html +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templatetags/__init__.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/templatetags/unfold_list.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/typing.py +0 -0
- {django_unfold-0.40.0 → django_unfold-0.42.0}/src/unfold/views.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: django-unfold
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.42.0
|
4
4
|
Summary: Modern Django admin theme for seamless interface development
|
5
5
|
Home-page: https://unfoldadmin.com
|
6
6
|
License: MIT
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
21
22
|
Requires-Dist: django (>=3.2)
|
22
23
|
Project-URL: Repository, https://github.com/unfoldadmin/django-unfold
|
23
24
|
Description-Content-Type: text/markdown
|
@@ -37,6 +38,9 @@ Unfold is a theme for Django admin that incorporates common best practices for b
|
|
37
38
|
- **Unfold:** Demo site is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
38
39
|
- **Formula:** Repository with demo implementation at [github.com/unfoldadmin/formula](https://github.com/unfoldadmin/formula?utm_medium=github&utm_source=unfold).
|
39
40
|
- **Turbo:** Django & Next.js boilerplate implementing Unfold at [github.com/unfoldadmin/turbo](https://github.com/unfoldadmin/turbo?utm_medium=github&utm_source=unfold).
|
41
|
+
- **Discord:** Join the Unfold community on [Discord](https://discord.gg/9sQj9MEbNz).
|
42
|
+
|
43
|
+
|
40
44
|
|
41
45
|
## Are you using Unfold and need help?
|
42
46
|
|
@@ -56,6 +60,7 @@ Have you decided to start using Unfold but don’t have time to make the switch
|
|
56
60
|
- **Inline tabs:** Groups inlines into tab navigation in the change form.
|
57
61
|
- **Model tabs:** Allows defining custom tab navigation for models.
|
58
62
|
- **Fieldset tabs:** Merges multiple fieldsets into tabs in the change form.
|
63
|
+
- **Sortable inlines:** Allows sorting inlines by dragging and dropping.
|
59
64
|
- **Environment label**: Distinguishes between environments by displaying a label.
|
60
65
|
- **Nonrelated inlines**: Displays nonrelated models as inlines in the change form.
|
61
66
|
- **Favicons**: Built-in support for configuring various site favicons.
|
@@ -13,6 +13,9 @@ Unfold is a theme for Django admin that incorporates common best practices for b
|
|
13
13
|
- **Unfold:** Demo site is available at [unfoldadmin.com](https://unfoldadmin.com?utm_medium=github&utm_source=unfold).
|
14
14
|
- **Formula:** Repository with demo implementation at [github.com/unfoldadmin/formula](https://github.com/unfoldadmin/formula?utm_medium=github&utm_source=unfold).
|
15
15
|
- **Turbo:** Django & Next.js boilerplate implementing Unfold at [github.com/unfoldadmin/turbo](https://github.com/unfoldadmin/turbo?utm_medium=github&utm_source=unfold).
|
16
|
+
- **Discord:** Join the Unfold community on [Discord](https://discord.gg/9sQj9MEbNz).
|
17
|
+
|
18
|
+
|
16
19
|
|
17
20
|
## Are you using Unfold and need help?
|
18
21
|
|
@@ -32,6 +35,7 @@ Have you decided to start using Unfold but don’t have time to make the switch
|
|
32
35
|
- **Inline tabs:** Groups inlines into tab navigation in the change form.
|
33
36
|
- **Model tabs:** Allows defining custom tab navigation for models.
|
34
37
|
- **Fieldset tabs:** Merges multiple fieldsets into tabs in the change form.
|
38
|
+
- **Sortable inlines:** Allows sorting inlines by dragging and dropping.
|
35
39
|
- **Environment label**: Distinguishes between environments by displaying a label.
|
36
40
|
- **Nonrelated inlines**: Displays nonrelated models as inlines in the change form.
|
37
41
|
- **Favicons**: Built-in support for configuring various site favicons.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "django-unfold"
|
3
|
-
version = "0.
|
3
|
+
version = "0.42.0"
|
4
4
|
description = "Modern Django admin theme for seamless interface development"
|
5
5
|
license = "MIT"
|
6
6
|
readme = "README.md"
|
@@ -16,6 +16,7 @@ classifiers = [
|
|
16
16
|
"Programming Language :: Python :: 3.10",
|
17
17
|
"Programming Language :: Python :: 3.11",
|
18
18
|
"Programming Language :: Python :: 3.12",
|
19
|
+
"Programming Language :: Python :: 3.13",
|
19
20
|
"Operating System :: OS Independent",
|
20
21
|
"Environment :: Web Environment",
|
21
22
|
"Intended Audience :: Developers",
|
@@ -89,7 +90,7 @@ legacy_tox_ini = """
|
|
89
90
|
[tox]
|
90
91
|
isolated_build = true
|
91
92
|
envlist =
|
92
|
-
python{38,39,310,311,312}-django{32,41,42,50,51}
|
93
|
+
python{38,39,310,311,312,313}-django{32,41,42,50,51}
|
93
94
|
|
94
95
|
[testenv]
|
95
96
|
skip_install = true
|
@@ -233,6 +233,7 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin):
|
|
233
233
|
add_fieldsets = ()
|
234
234
|
list_horizontal_scrollbar_top = False
|
235
235
|
list_filter_submit = False
|
236
|
+
list_filter_sheet = True
|
236
237
|
list_fullwidth = False
|
237
238
|
list_disable_select_all = False
|
238
239
|
list_before_template = None
|
@@ -471,7 +472,12 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin):
|
|
471
472
|
for action in self.get_actions_row(request)
|
472
473
|
]
|
473
474
|
|
474
|
-
extra_context.update(
|
475
|
+
extra_context.update(
|
476
|
+
{
|
477
|
+
"actions_list": actions,
|
478
|
+
"actions_row": actions_row,
|
479
|
+
}
|
480
|
+
)
|
475
481
|
|
476
482
|
return super().changelist_view(request, extra_context)
|
477
483
|
|
@@ -560,8 +566,12 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin):
|
|
560
566
|
class TabularInline(ModelAdminMixin, BaseTabularInline):
|
561
567
|
formfield_overrides = FORMFIELD_OVERRIDES_INLINE
|
562
568
|
readonly_preprocess_fields = {}
|
569
|
+
ordering_field = None
|
570
|
+
hide_ordering_field = False
|
563
571
|
|
564
572
|
|
565
573
|
class StackedInline(ModelAdminMixin, BaseStackedInline):
|
566
574
|
formfield_overrides = FORMFIELD_OVERRIDES_INLINE
|
567
575
|
readonly_preprocess_fields = {}
|
576
|
+
ordering_field = None
|
577
|
+
hide_ordering_field = False
|
@@ -16,9 +16,10 @@ from django.db.models.fields import (
|
|
16
16
|
)
|
17
17
|
from django.forms import ValidationError
|
18
18
|
from django.http import HttpRequest
|
19
|
-
from django.utils.dateparse import parse_datetime
|
20
19
|
from django.utils.translation import gettext_lazy as _
|
21
20
|
|
21
|
+
from unfold.utils import parse_date_str, parse_datetime_str
|
22
|
+
|
22
23
|
from .forms import (
|
23
24
|
DropdownForm,
|
24
25
|
RangeDateForm,
|
@@ -468,25 +469,13 @@ class RangeDateFilter(admin.FieldListFilter):
|
|
468
469
|
def queryset(self, request: HttpRequest, queryset: QuerySet) -> QuerySet:
|
469
470
|
filters = {}
|
470
471
|
|
471
|
-
value_from = self.used_parameters.get(self.parameter_name + "_from"
|
472
|
+
value_from = self.used_parameters.get(self.parameter_name + "_from")
|
472
473
|
if value_from not in EMPTY_VALUES:
|
473
|
-
filters.update(
|
474
|
-
{
|
475
|
-
self.parameter_name + "__gte": self.used_parameters.get(
|
476
|
-
self.parameter_name + "_from", None
|
477
|
-
),
|
478
|
-
}
|
479
|
-
)
|
474
|
+
filters.update({self.parameter_name + "__gte": parse_date_str(value_from)})
|
480
475
|
|
481
|
-
value_to = self.used_parameters.get(self.parameter_name + "_to"
|
476
|
+
value_to = self.used_parameters.get(self.parameter_name + "_to")
|
482
477
|
if value_to not in EMPTY_VALUES:
|
483
|
-
filters.update(
|
484
|
-
{
|
485
|
-
self.parameter_name + "__lte": self.used_parameters.get(
|
486
|
-
self.parameter_name + "_to", None
|
487
|
-
),
|
488
|
-
}
|
489
|
-
)
|
478
|
+
filters.update({self.parameter_name + "__lte": parse_date_str(value_to)})
|
490
479
|
|
491
480
|
try:
|
492
481
|
return queryset.filter(**filters)
|
@@ -546,18 +535,22 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
546
535
|
|
547
536
|
if self.parameter_name + "_from_0" in params:
|
548
537
|
value = params.pop(self.field_path + "_from_0")
|
538
|
+
value = value[0] if isinstance(value, list) else value
|
549
539
|
self.used_parameters[self.field_path + "_from_0"] = value
|
550
540
|
|
551
541
|
if self.parameter_name + "_from_1" in params:
|
552
542
|
value = params.pop(self.field_path + "_from_1")
|
543
|
+
value = value[0] if isinstance(value, list) else value
|
553
544
|
self.used_parameters[self.field_path + "_from_1"] = value
|
554
545
|
|
555
546
|
if self.parameter_name + "_to_0" in params:
|
556
547
|
value = params.pop(self.field_path + "_to_0")
|
548
|
+
value = value[0] if isinstance(value, list) else value
|
557
549
|
self.used_parameters[self.field_path + "_to_0"] = value
|
558
550
|
|
559
551
|
if self.parameter_name + "_to_1" in params:
|
560
552
|
value = params.pop(self.field_path + "_to_1")
|
553
|
+
value = value[0] if isinstance(value, list) else value
|
561
554
|
self.used_parameters[self.field_path + "_to_1"] = value
|
562
555
|
|
563
556
|
def expected_parameters(self) -> List[str]:
|
@@ -571,20 +564,17 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
571
564
|
def queryset(self, request: HttpRequest, queryset: QuerySet) -> QuerySet:
|
572
565
|
filters = {}
|
573
566
|
|
574
|
-
date_value_from = self.used_parameters.get(
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
)
|
580
|
-
date_value_to = self.used_parameters.get(self.parameter_name + "_to_0", None)
|
581
|
-
time_value_to = self.used_parameters.get(self.parameter_name + "_to_1", None)
|
567
|
+
date_value_from = self.used_parameters.get(self.parameter_name + "_from_0")
|
568
|
+
time_value_from = self.used_parameters.get(self.parameter_name + "_from_1")
|
569
|
+
|
570
|
+
date_value_to = self.used_parameters.get(self.parameter_name + "_to_0")
|
571
|
+
time_value_to = self.used_parameters.get(self.parameter_name + "_to_1")
|
582
572
|
|
583
573
|
if date_value_from not in EMPTY_VALUES and time_value_from not in EMPTY_VALUES:
|
584
574
|
filters.update(
|
585
575
|
{
|
586
|
-
f"{self.parameter_name}__gte":
|
587
|
-
f"{date_value_from}
|
576
|
+
f"{self.parameter_name}__gte": parse_datetime_str(
|
577
|
+
f"{date_value_from} {time_value_from}"
|
588
578
|
),
|
589
579
|
}
|
590
580
|
)
|
@@ -592,8 +582,8 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
592
582
|
if date_value_to not in EMPTY_VALUES and time_value_to not in EMPTY_VALUES:
|
593
583
|
filters.update(
|
594
584
|
{
|
595
|
-
f"{self.parameter_name}__lte":
|
596
|
-
f"{date_value_to}
|
585
|
+
f"{self.parameter_name}__lte": parse_datetime_str(
|
586
|
+
f"{date_value_to} {time_value_to}"
|
597
587
|
),
|
598
588
|
}
|
599
589
|
)
|
@@ -612,16 +602,16 @@ class RangeDateTimeFilter(admin.FieldListFilter):
|
|
612
602
|
name=self.parameter_name,
|
613
603
|
data={
|
614
604
|
self.parameter_name + "_from_0": self.used_parameters.get(
|
615
|
-
self.parameter_name + "_from_0"
|
605
|
+
self.parameter_name + "_from_0"
|
616
606
|
),
|
617
607
|
self.parameter_name + "_from_1": self.used_parameters.get(
|
618
|
-
self.parameter_name + "_from_1"
|
608
|
+
self.parameter_name + "_from_1"
|
619
609
|
),
|
620
610
|
self.parameter_name + "_to_0": self.used_parameters.get(
|
621
|
-
self.parameter_name + "_to_0"
|
611
|
+
self.parameter_name + "_to_0"
|
622
612
|
),
|
623
613
|
self.parameter_name + "_to_1": self.used_parameters.get(
|
624
|
-
self.parameter_name + "_to_1"
|
614
|
+
self.parameter_name + "_to_1"
|
625
615
|
),
|
626
616
|
},
|
627
617
|
),
|
@@ -26,7 +26,7 @@ class DropdownForm(forms.Form):
|
|
26
26
|
widget = UnfoldAdminSelectWidget(
|
27
27
|
attrs={
|
28
28
|
"data-theme": "admin-autocomplete",
|
29
|
-
"class": "admin-autocomplete",
|
29
|
+
"class": "unfold-admin-autocomplete admin-autocomplete",
|
30
30
|
}
|
31
31
|
)
|
32
32
|
field = ChoiceField
|
@@ -38,7 +38,7 @@ class DropdownForm(forms.Form):
|
|
38
38
|
self.widget = UnfoldAdminSelectMultipleWidget(
|
39
39
|
attrs={
|
40
40
|
"data-theme": "admin-autocomplete",
|
41
|
-
"class": "admin-autocomplete",
|
41
|
+
"class": "unfold-admin-autocomplete admin-autocomplete",
|
42
42
|
}
|
43
43
|
)
|
44
44
|
self.field = MultipleChoiceField
|
@@ -14,7 +14,7 @@
|
|
14
14
|
{% endfor %}
|
15
15
|
|
16
16
|
<template x-for="(item, index) in items" :key="item.key">
|
17
|
-
<div class="flex flex-row">
|
17
|
+
<div class="flex flex-row" x-init="if ($el.getElementsByTagName('input')[0].name.includes('__prefix__')) { $el.getElementsByTagName('input')[0].name = $el.parentElement.getElementsByTagName('input')[0].name }">
|
18
18
|
{% with widget=template %}
|
19
19
|
{% include template.template_name %}
|
20
20
|
{% endwith %}
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</template>
|
27
27
|
|
28
28
|
<div class="flex flex-row">
|
29
|
-
<div x-on:click="items.push({ key: new Date().getTime()})" class="bg-primary-600 border border-transparent cursor-pointer font-medium inline-block px-3 py-2 rounded-md text-sm text-white w-full lg:w-auto">
|
29
|
+
<div x-on:click="items.push({ key: new Date().getTime()})" class="bg-primary-600 border border-transparent cursor-pointer font-medium inline-block px-3 py-2 rounded-md text-center text-sm text-white w-full lg:w-auto">
|
30
30
|
{% trans "Add new item" %}
|
31
31
|
</div>
|
32
32
|
</div>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
{% load admin_urls i18n guardian_tags %}
|
4
4
|
|
5
5
|
{% block breadcrumbs %}{% if not is_popup %}
|
6
|
-
<div class="px-4 lg:px-
|
6
|
+
<div class="px-4 lg:px-8">
|
7
7
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
8
|
-
<ul class="flex">
|
8
|
+
<ul class="flex flex-wrap">
|
9
9
|
{% url 'admin:index' as link %}
|
10
10
|
{% trans 'Home' as name %}
|
11
11
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -6,9 +6,9 @@
|
|
6
6
|
{% endblock %}
|
7
7
|
|
8
8
|
{% block breadcrumbs %}{% if not is_popup %}
|
9
|
-
<div class="px-4 lg:px-
|
9
|
+
<div class="px-4 lg:px-8">
|
10
10
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
11
|
-
<ul class="flex">
|
11
|
+
<ul class="flex flex-wrap">
|
12
12
|
{% url 'admin:index' as link %}
|
13
13
|
{% trans 'Home' as name %}
|
14
14
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -7,9 +7,9 @@
|
|
7
7
|
{% endblock %}
|
8
8
|
|
9
9
|
{% block breadcrumbs %}{% if not is_popup %}
|
10
|
-
<div class="px-4 lg:px-
|
10
|
+
<div class="px-4 lg:px-8">
|
11
11
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
12
|
-
<ul class="flex">
|
12
|
+
<ul class="flex flex-wrap">
|
13
13
|
{% url 'admin:index' as link %}
|
14
14
|
{% trans 'Home' as name %}
|
15
15
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -10,9 +10,9 @@
|
|
10
10
|
{% endblock %}
|
11
11
|
|
12
12
|
{% block breadcrumbs %}
|
13
|
-
<div class="px-4 lg:px-
|
13
|
+
<div class="px-4 lg:px-8">
|
14
14
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
15
|
-
<ul class="flex">
|
15
|
+
<ul class="flex flex-wrap">
|
16
16
|
{% url 'admin:index' as link %}
|
17
17
|
{% trans 'Home' as name %}
|
18
18
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -21,9 +21,9 @@
|
|
21
21
|
{% endblock %}
|
22
22
|
|
23
23
|
{% block breadcrumbs %}
|
24
|
-
<div class="px-4 lg:px-
|
24
|
+
<div class="px-4 lg:px-8">
|
25
25
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
26
|
-
<ul class="flex">
|
26
|
+
<ul class="flex flex-wrap">
|
27
27
|
{% url 'admin:index' as link %}
|
28
28
|
{% trans 'Home' as name %}
|
29
29
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -4,9 +4,9 @@
|
|
4
4
|
{% load url from simple_history_compat %}
|
5
5
|
|
6
6
|
{% block breadcrumbs %}
|
7
|
-
<div class="px-4 lg:px-
|
7
|
+
<div class="px-4 lg:px-8">
|
8
8
|
<div class="container mb-6 mx-auto -my-3 lg:mb-12">
|
9
|
-
<ul class="flex">
|
9
|
+
<ul class="flex flex-wrap">
|
10
10
|
{% url 'admin:index' as link %}
|
11
11
|
{% trans 'Home' as name %}
|
12
12
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div {% if not is_popup %}id="submit-row"{% endif %} class="relative z-20 {% if not is_popup %} mt-20 lg:mt-8{% endif %}">
|
4
4
|
<div class="{% if not is_popup %}bottom-0 fixed left-0 right-0{% endif %}" {% if not is_popup %}x-bind:class="{'xl:left-0': !sidebarDesktopOpen, 'xl:left-72': sidebarDesktopOpen}"{% endif %}>
|
5
|
-
<div class="bg-white dark:bg-gray-900 {% if not is_popup %}border-t px-4 py-4 relative scrollable-top lg:px-
|
5
|
+
<div class="bg-white dark:bg-gray-900 {% if not is_popup %}border-t px-4 py-4 relative scrollable-top lg:px-8 dark:border-gray-800{% endif %}">
|
6
6
|
<div class="container flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse">
|
7
7
|
{% if not revert_disabled %}
|
8
8
|
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-md text-sm text-white w-full lg:w-auto" name="_save" {{ onclick_attrib }}>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from http import HTTPStatus
|
2
2
|
from typing import Any, Callable, Dict, List, Optional, Union
|
3
|
+
from urllib.parse import parse_qs, urlparse
|
3
4
|
|
4
5
|
from django.contrib.admin import AdminSite
|
5
6
|
from django.contrib.auth import REDIRECT_FIELD_NAME
|
@@ -84,6 +85,7 @@ class UnfoldAdminSite(AdminSite):
|
|
84
85
|
"show_view_on_site": get_config(self.settings_name)[
|
85
86
|
"SHOW_VIEW_ON_SITE"
|
86
87
|
],
|
88
|
+
"show_languages": get_config(self.settings_name)["SHOW_LANGUAGES"],
|
87
89
|
"colors": self._process_colors(
|
88
90
|
get_config(self.settings_name)["COLORS"]
|
89
91
|
),
|
@@ -234,6 +236,7 @@ class UnfoldAdminSite(AdminSite):
|
|
234
236
|
|
235
237
|
def get_sidebar_list(self, request: HttpRequest) -> List[Dict[str, Any]]:
|
236
238
|
navigation = get_config(self.settings_name)["SIDEBAR"].get("navigation", [])
|
239
|
+
tabs = get_config(self.settings_name)["TABS"]
|
237
240
|
results = []
|
238
241
|
|
239
242
|
for group in navigation:
|
@@ -245,7 +248,8 @@ class UnfoldAdminSite(AdminSite):
|
|
245
248
|
request, item.get("link_callback") or item["link"]
|
246
249
|
)
|
247
250
|
|
248
|
-
|
251
|
+
# Checks if any tab item is active and then marks the sidebar link as active
|
252
|
+
for tab in tabs:
|
249
253
|
has_primary_link = False
|
250
254
|
has_tab_link_active = False
|
251
255
|
|
@@ -302,7 +306,7 @@ class UnfoldAdminSite(AdminSite):
|
|
302
306
|
item["link_callback"] = lazy(item["link"])(request)
|
303
307
|
|
304
308
|
item["active"] = self._get_is_active(
|
305
|
-
request, item.get("link_callback") or item["link"]
|
309
|
+
request, item.get("link_callback") or item["link"], True
|
306
310
|
)
|
307
311
|
allowed_items.append(item)
|
308
312
|
|
@@ -391,13 +395,29 @@ class UnfoldAdminSite(AdminSite):
|
|
391
395
|
|
392
396
|
return colors
|
393
397
|
|
394
|
-
def _get_is_active(
|
398
|
+
def _get_is_active(
|
399
|
+
self, request: HttpRequest, link: str, is_tab: bool = False
|
400
|
+
) -> bool:
|
395
401
|
if not isinstance(link, str):
|
396
402
|
link = str(link)
|
397
403
|
|
398
|
-
|
404
|
+
index_path = reverse_lazy(f"{self.name}:index")
|
405
|
+
link_path = urlparse(link).path
|
406
|
+
|
407
|
+
# Dashboard
|
408
|
+
if link_path == request.path == index_path:
|
399
409
|
return True
|
400
|
-
|
410
|
+
|
411
|
+
if link_path in request.path and link_path != index_path:
|
412
|
+
query_params = parse_qs(urlparse(link).query)
|
413
|
+
request_params = parse_qs(request.GET.urlencode())
|
414
|
+
|
415
|
+
# In case of tabs, we need to check if the query params are the same
|
416
|
+
if is_tab and not all(
|
417
|
+
request_params.get(k) == v for k, v in query_params.items()
|
418
|
+
):
|
419
|
+
return False
|
420
|
+
|
401
421
|
return True
|
402
422
|
|
403
423
|
return False
|