django-unfold 0.60.0__py3-none-any.whl → 0.61.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.60.0.dist-info → django_unfold-0.61.0.dist-info}/METADATA +15 -6
- {django_unfold-0.60.0.dist-info → django_unfold-0.61.0.dist-info}/RECORD +40 -37
- unfold/admin.py +1 -1
- unfold/contrib/import_export/templates/admin/import_export/change_list_import.html +5 -0
- unfold/contrib/simple_history/templates/simple_history/submit_line.html +16 -18
- unfold/forms.py +2 -2
- unfold/mixins/base_model_admin.py +7 -2
- unfold/sites.py +15 -2
- unfold/static/unfold/css/styles.css +1 -1
- unfold/static/unfold/js/app.js +61 -0
- unfold/styles.css +3 -5
- unfold/templates/admin/auth/user/add_form.html +1 -5
- unfold/templates/admin/change_form.html +3 -1
- unfold/templates/admin/change_list.html +4 -2
- unfold/templates/admin/change_list_results.html +3 -3
- unfold/templates/admin/edit_inline/stacked.html +8 -2
- unfold/templates/admin/edit_inline/tabular.html +2 -2
- unfold/templates/admin/includes/fieldset.html +9 -3
- unfold/templates/admin/search_form.html +14 -5
- unfold/templates/admin/submit_line.html +1 -1
- unfold/templates/unfold/components/card.html +4 -4
- unfold/templates/unfold/helpers/add_link.html +3 -1
- unfold/templates/unfold/helpers/fieldsets_tabs.html +3 -3
- unfold/templates/unfold/helpers/help_text.html +1 -1
- unfold/templates/unfold/helpers/messages.html +4 -4
- unfold/templates/unfold/helpers/pagination.html +1 -1
- unfold/templates/unfold/helpers/popup_header.html +27 -0
- unfold/templates/unfold/helpers/search.html +16 -12
- unfold/templates/unfold/helpers/search_results.html +10 -9
- unfold/templates/unfold/helpers/shortcut.html +3 -0
- unfold/templates/unfold/helpers/site_branding.html +2 -2
- unfold/templates/unfold/helpers/tab_action.html +4 -3
- unfold/templates/unfold_crispy/field.html +12 -10
- unfold/templates/unfold_crispy/layout/checkbox.html +20 -4
- unfold/templates/unfold_crispy/layout/fieldset.html +3 -3
- unfold/templatetags/unfold.py +3 -3
- unfold/templatetags/unfold_list.py +4 -1
- unfold/widgets.py +2 -1
- {django_unfold-0.60.0.dist-info → django_unfold-0.61.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.60.0.dist-info → django_unfold-0.61.0.dist-info}/WHEEL +0 -0
unfold/templatetags/unfold.py
CHANGED
@@ -340,7 +340,7 @@ def preserve_changelist_filters(context: Context) -> dict[str, dict[str, str]]:
|
|
340
340
|
@register.simple_tag(takes_context=True)
|
341
341
|
def element_classes(context: Context, key: str) -> str:
|
342
342
|
if key in context.get("element_classes", {}):
|
343
|
-
if isinstance(context["element_classes"][key], list
|
343
|
+
if isinstance(context["element_classes"][key], (list, tuple)):
|
344
344
|
return " ".join(context["element_classes"][key])
|
345
345
|
|
346
346
|
return context["element_classes"][key]
|
@@ -385,8 +385,8 @@ def fieldset_row_classes(context: Context) -> str:
|
|
385
385
|
if (
|
386
386
|
formset
|
387
387
|
and hasattr(field.field, "name")
|
388
|
-
and field.field.name == formset.opts
|
389
|
-
and formset.opts
|
388
|
+
and field.field.name == getattr(formset.opts, "ordering_field", None)
|
389
|
+
and getattr(formset.opts, "hide_ordering_field", False)
|
390
390
|
):
|
391
391
|
classes.append("hidden")
|
392
392
|
|
unfold/widgets.py
CHANGED
@@ -290,7 +290,8 @@ FILE_CLASSES = [
|
|
290
290
|
|
291
291
|
class UnfoldPrefixSuffixMixin:
|
292
292
|
def get_context(self, name, value, attrs):
|
293
|
-
|
293
|
+
context = super().get_context(name, value, attrs)
|
294
|
+
widget = context["widget"]
|
294
295
|
|
295
296
|
if "prefix" in self.attrs:
|
296
297
|
widget["prefix"] = self.attrs["prefix"]
|
File without changes
|
File without changes
|