django-unfold 0.55.2__py3-none-any.whl → 1.0.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.55.2.dist-info → django_unfold-1.0.0.dist-info}/METADATA +1 -1
- {django_unfold-0.55.2.dist-info → django_unfold-1.0.0.dist-info}/RECORD +124 -123
- {django_unfold-0.55.2.dist-info → django_unfold-1.0.0.dist-info}/WHEEL +1 -1
- unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +2 -2
- unfold/contrib/forms/templates/unfold/forms/array.html +5 -5
- unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html +23 -23
- unfold/contrib/forms/widgets.py +7 -7
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +4 -2
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +5 -3
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +5 -3
- unfold/contrib/guardian/templates/unfold/guardian/group_form.html +4 -4
- unfold/contrib/guardian/templates/unfold/guardian/user_form.html +4 -4
- unfold/contrib/import_export/templates/admin/import_export/change_form.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/export.html +4 -4
- unfold/contrib/import_export/templates/admin/import_export/import.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +2 -2
- unfold/contrib/import_export/templates/admin/import_export/import_errors.html +18 -12
- unfold/contrib/import_export/templates/admin/import_export/import_form.html +2 -2
- unfold/contrib/import_export/templates/admin/import_export/import_preview.html +2 -2
- unfold/contrib/import_export/templates/admin/import_export/import_validation.html +7 -7
- unfold/contrib/simple_history/templates/simple_history/object_history.html +3 -3
- unfold/contrib/simple_history/templates/simple_history/object_history_form.html +2 -2
- unfold/contrib/simple_history/templates/simple_history/object_history_list.html +2 -2
- unfold/contrib/simple_history/templates/simple_history/submit_line.html +4 -4
- unfold/forms.py +1 -1
- unfold/settings.py +22 -22
- unfold/sites.py +10 -5
- unfold/static/unfold/css/styles.css +2 -1
- unfold/static/unfold/fonts/material-symbols/styles.css +0 -16
- unfold/styles.css +140 -84
- unfold/templates/admin/actions.html +4 -4
- unfold/templates/admin/app_index.html +1 -1
- unfold/templates/admin/app_list.html +2 -2
- unfold/templates/admin/auth/user/add_form.html +1 -1
- unfold/templates/admin/auth/user/change_password.html +2 -2
- unfold/templates/admin/base.html +6 -6
- unfold/templates/admin/change_form.html +6 -4
- unfold/templates/admin/change_list.html +11 -9
- unfold/templates/admin/change_list_results.html +4 -4
- unfold/templates/admin/date_hierarchy.html +1 -1
- unfold/templates/admin/delete_confirmation.html +4 -4
- unfold/templates/admin/delete_selected_confirmation.html +3 -3
- unfold/templates/admin/edit_inline/stacked.html +3 -3
- unfold/templates/admin/edit_inline/tabular.html +4 -4
- unfold/templates/admin/filter.html +3 -3
- unfold/templates/admin/includes/fieldset.html +1 -1
- unfold/templates/admin/index.html +1 -1
- unfold/templates/admin/login.html +9 -7
- unfold/templates/admin/nav_sidebar.html +11 -3
- unfold/templates/admin/object_history.html +4 -4
- unfold/templates/admin/pagination.html +18 -24
- unfold/templates/admin/search_form.html +3 -3
- unfold/templates/admin/submit_line.html +53 -56
- unfold/templates/auth/widgets/read_only_password_hash.html +1 -1
- unfold/templates/registration/logged_out.html +6 -8
- unfold/templates/registration/password_change_done.html +1 -1
- unfold/templates/registration/password_change_form.html +1 -1
- unfold/templates/unfold/components/button.html +1 -1
- unfold/templates/unfold/components/card.html +5 -5
- unfold/templates/unfold/components/chart/cohort.html +2 -2
- unfold/templates/unfold/components/navigation.html +2 -2
- unfold/templates/unfold/components/progress.html +1 -1
- unfold/templates/unfold/components/table.html +3 -3
- unfold/templates/unfold/components/tracker.html +1 -1
- unfold/templates/unfold/helpers/account_links.html +7 -7
- unfold/templates/unfold/helpers/actions_row.html +3 -3
- unfold/templates/unfold/helpers/app_list.html +7 -7
- unfold/templates/unfold/helpers/app_list_default.html +2 -2
- unfold/templates/unfold/helpers/change_list_actions.html +1 -1
- unfold/templates/unfold/helpers/change_list_filter.html +4 -4
- unfold/templates/unfold/helpers/change_list_filter_actions.html +5 -5
- unfold/templates/unfold/helpers/delete_submit_line.html +2 -2
- unfold/templates/unfold/helpers/display_dropdown.html +3 -3
- unfold/templates/unfold/helpers/display_header.html +1 -1
- unfold/templates/unfold/helpers/edit_inline/tabular_delete.html +1 -1
- unfold/templates/unfold/helpers/edit_inline/tabular_field.html +1 -1
- unfold/templates/unfold/helpers/edit_inline/tabular_row.html +1 -1
- unfold/templates/unfold/helpers/edit_inline/tabular_title.html +1 -1
- unfold/templates/unfold/helpers/empty_results.html +4 -4
- unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
- unfold/templates/unfold/helpers/fieldset_row_checkbox.html +2 -2
- unfold/templates/unfold/helpers/fieldset_row_field.html +1 -1
- unfold/templates/unfold/helpers/fieldsets_tabs.html +1 -1
- unfold/templates/unfold/helpers/header.html +3 -1
- unfold/templates/unfold/helpers/header_back_button.html +1 -1
- unfold/templates/unfold/helpers/history.html +2 -2
- unfold/templates/unfold/helpers/label.html +1 -1
- unfold/templates/unfold/helpers/language_switch.html +3 -3
- unfold/templates/unfold/helpers/messages/debug.html +1 -1
- unfold/templates/unfold/helpers/messages/error.html +1 -1
- unfold/templates/unfold/helpers/messages/errornote.html +1 -1
- unfold/templates/unfold/helpers/messages/info.html +1 -1
- unfold/templates/unfold/helpers/messages/success.html +1 -1
- unfold/templates/unfold/helpers/messages/warning.html +1 -1
- unfold/templates/unfold/helpers/messages.html +1 -1
- unfold/templates/unfold/helpers/navigation.html +10 -14
- unfold/templates/unfold/helpers/navigation_header.html +6 -4
- unfold/templates/unfold/helpers/pagination.html +7 -0
- unfold/templates/unfold/helpers/search.html +2 -2
- unfold/templates/unfold/helpers/search_results.html +1 -1
- unfold/templates/unfold/helpers/site_dropdown.html +2 -2
- unfold/templates/unfold/helpers/site_icon.html +6 -6
- unfold/templates/unfold/helpers/submit.html +1 -1
- unfold/templates/unfold/helpers/tab_action.html +5 -5
- unfold/templates/unfold/helpers/tab_actions.html +1 -1
- unfold/templates/unfold/helpers/tab_items.html +8 -8
- unfold/templates/unfold/helpers/tab_list.html +1 -1
- unfold/templates/unfold/helpers/theme_switch.html +8 -8
- unfold/templates/unfold/helpers/welcomemsg.html +3 -3
- unfold/templates/unfold/layouts/base_simple.html +3 -3
- unfold/templates/unfold/layouts/skeleton.html +2 -2
- unfold/templates/unfold/widgets/clearable_file_input.html +3 -3
- unfold/templates/unfold/widgets/clearable_file_input_small.html +5 -5
- unfold/templates/unfold/widgets/foreign_key_raw_id.html +5 -5
- unfold/templates/unfold/widgets/related_widget_wrapper.html +8 -8
- unfold/templates/unfold/widgets/split_datetime.html +2 -2
- unfold/templates/unfold_crispy/field.html +1 -1
- unfold/templates/unfold_crispy/inputs.html +1 -1
- unfold/templates/unfold_crispy/layout/checkbox.html +1 -1
- unfold/templates/unfold_crispy/layout/fieldset.html +1 -1
- unfold/templates/unfold_crispy/layout/table_inline_formset.html +2 -2
- unfold/templatetags/unfold.py +23 -9
- unfold/widgets.py +29 -34
- {django_unfold-0.55.2.dist-info → django_unfold-1.0.0.dist-info}/LICENSE.md +0 -0
unfold/settings.py
CHANGED
@@ -18,30 +18,30 @@ CONFIG_DEFAULTS = {
|
|
18
18
|
"SHOW_BACK_BUTTON": False,
|
19
19
|
"COLORS": {
|
20
20
|
"base": {
|
21
|
-
"50": "249 250 251",
|
22
|
-
"100": "243 244 246",
|
23
|
-
"200": "229 231 235",
|
24
|
-
"300": "209 213 219",
|
25
|
-
"400": "156 163 175",
|
26
|
-
"500": "107 114 128",
|
27
|
-
"600": "75 85 99",
|
28
|
-
"700": "55 65 81",
|
29
|
-
"800": "31 41 55",
|
30
|
-
"900": "17 24 39",
|
31
|
-
"950": "3 7 18",
|
21
|
+
"50": "249, 250, 251",
|
22
|
+
"100": "243, 244, 246",
|
23
|
+
"200": "229, 231, 235",
|
24
|
+
"300": "209, 213, 219",
|
25
|
+
"400": "156, 163, 175",
|
26
|
+
"500": "107, 114, 128",
|
27
|
+
"600": "75, 85, 99",
|
28
|
+
"700": "55, 65, 81",
|
29
|
+
"800": "31, 41, 55",
|
30
|
+
"900": "17, 24, 39",
|
31
|
+
"950": "3, 7, 18",
|
32
32
|
},
|
33
33
|
"primary": {
|
34
|
-
"50": "250 245 255",
|
35
|
-
"100": "243 232 255",
|
36
|
-
"200": "233 213 255",
|
37
|
-
"300": "216 180 254",
|
38
|
-
"400": "192 132 252",
|
39
|
-
"500": "168 85 247",
|
40
|
-
"600": "147 51 234",
|
41
|
-
"700": "126 34 206",
|
42
|
-
"800": "107 33 168",
|
43
|
-
"900": "88 28 135",
|
44
|
-
"950": "59 7 100",
|
34
|
+
"50": "250, 245, 255",
|
35
|
+
"100": "243, 232, 255",
|
36
|
+
"200": "233, 213, 255",
|
37
|
+
"300": "216, 180, 254",
|
38
|
+
"400": "192, 132, 252",
|
39
|
+
"500": "168, 85, 247",
|
40
|
+
"600": "147, 51, 234",
|
41
|
+
"700": "126, 34, 206",
|
42
|
+
"800": "107, 33, 168",
|
43
|
+
"900": "88, 28, 135",
|
44
|
+
"950": "59, 7, 100",
|
45
45
|
},
|
46
46
|
"font": {
|
47
47
|
"subtle-light": "var(--color-base-500)", # text-base-500
|
unfold/sites.py
CHANGED
@@ -82,9 +82,9 @@ class UnfoldAdminSite(AdminSite):
|
|
82
82
|
"switch": " ".join(SWITCH_CLASSES),
|
83
83
|
"file": " ".join(FILE_CLASSES),
|
84
84
|
},
|
85
|
-
"site_title": self._get_config("SITE_TITLE", request)
|
86
|
-
"site_header": self._get_config("SITE_HEADER", request)
|
87
|
-
"site_url": self._get_config("SITE_URL", request)
|
85
|
+
"site_title": self._get_config("SITE_TITLE", request),
|
86
|
+
"site_header": self._get_config("SITE_HEADER", request),
|
87
|
+
"site_url": self._get_config("SITE_URL", request),
|
88
88
|
"site_subheader": self._get_config("SITE_SUBHEADER", request),
|
89
89
|
"site_dropdown": self._get_site_dropdown_items("SITE_DROPDOWN", request),
|
90
90
|
"site_logo": self._get_theme_images("SITE_LOGO", request),
|
@@ -407,7 +407,7 @@ class UnfoldAdminSite(AdminSite):
|
|
407
407
|
colors = self._get_config(key, *args)
|
408
408
|
|
409
409
|
def rgb_to_values(value: str) -> str:
|
410
|
-
return " ".join(
|
410
|
+
return ", ".join(
|
411
411
|
list(
|
412
412
|
map(
|
413
413
|
str.strip,
|
@@ -417,7 +417,7 @@ class UnfoldAdminSite(AdminSite):
|
|
417
417
|
)
|
418
418
|
|
419
419
|
def hex_to_values(value: str) -> str:
|
420
|
-
return " ".join(str(item) for item in hex_to_rgb(value))
|
420
|
+
return ", ".join(str(item) for item in hex_to_rgb(value))
|
421
421
|
|
422
422
|
for name, weights in colors.items():
|
423
423
|
weights = self._get_value(weights, *args)
|
@@ -428,6 +428,11 @@ class UnfoldAdminSite(AdminSite):
|
|
428
428
|
colors[name][weight] = hex_to_values(value)
|
429
429
|
elif value.startswith("rgb"):
|
430
430
|
colors[name][weight] = rgb_to_values(value)
|
431
|
+
elif isinstance(value, str) and all(
|
432
|
+
part.isdigit() for part in value.split()
|
433
|
+
):
|
434
|
+
colors[name][weight] = ", ".join(value.split(" "))
|
435
|
+
pass
|
431
436
|
|
432
437
|
return colors
|
433
438
|
|