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.
Files changed (124) hide show
  1. {django_unfold-0.55.2.dist-info → django_unfold-1.0.0.dist-info}/METADATA +1 -1
  2. {django_unfold-0.55.2.dist-info → django_unfold-1.0.0.dist-info}/RECORD +124 -123
  3. {django_unfold-0.55.2.dist-info → django_unfold-1.0.0.dist-info}/WHEEL +1 -1
  4. unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +2 -2
  5. unfold/contrib/forms/templates/unfold/forms/array.html +5 -5
  6. unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html +23 -23
  7. unfold/contrib/forms/widgets.py +7 -7
  8. unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +4 -2
  9. unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +5 -3
  10. unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +5 -3
  11. unfold/contrib/guardian/templates/unfold/guardian/group_form.html +4 -4
  12. unfold/contrib/guardian/templates/unfold/guardian/user_form.html +4 -4
  13. unfold/contrib/import_export/templates/admin/import_export/change_form.html +1 -1
  14. unfold/contrib/import_export/templates/admin/import_export/export.html +4 -4
  15. unfold/contrib/import_export/templates/admin/import_export/import.html +1 -1
  16. unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +2 -2
  17. unfold/contrib/import_export/templates/admin/import_export/import_errors.html +18 -12
  18. unfold/contrib/import_export/templates/admin/import_export/import_form.html +2 -2
  19. unfold/contrib/import_export/templates/admin/import_export/import_preview.html +2 -2
  20. unfold/contrib/import_export/templates/admin/import_export/import_validation.html +7 -7
  21. unfold/contrib/simple_history/templates/simple_history/object_history.html +3 -3
  22. unfold/contrib/simple_history/templates/simple_history/object_history_form.html +2 -2
  23. unfold/contrib/simple_history/templates/simple_history/object_history_list.html +2 -2
  24. unfold/contrib/simple_history/templates/simple_history/submit_line.html +4 -4
  25. unfold/forms.py +1 -1
  26. unfold/settings.py +22 -22
  27. unfold/sites.py +10 -5
  28. unfold/static/unfold/css/styles.css +2 -1
  29. unfold/static/unfold/fonts/material-symbols/styles.css +0 -16
  30. unfold/styles.css +140 -84
  31. unfold/templates/admin/actions.html +4 -4
  32. unfold/templates/admin/app_index.html +1 -1
  33. unfold/templates/admin/app_list.html +2 -2
  34. unfold/templates/admin/auth/user/add_form.html +1 -1
  35. unfold/templates/admin/auth/user/change_password.html +2 -2
  36. unfold/templates/admin/base.html +6 -6
  37. unfold/templates/admin/change_form.html +6 -4
  38. unfold/templates/admin/change_list.html +11 -9
  39. unfold/templates/admin/change_list_results.html +4 -4
  40. unfold/templates/admin/date_hierarchy.html +1 -1
  41. unfold/templates/admin/delete_confirmation.html +4 -4
  42. unfold/templates/admin/delete_selected_confirmation.html +3 -3
  43. unfold/templates/admin/edit_inline/stacked.html +3 -3
  44. unfold/templates/admin/edit_inline/tabular.html +4 -4
  45. unfold/templates/admin/filter.html +3 -3
  46. unfold/templates/admin/includes/fieldset.html +1 -1
  47. unfold/templates/admin/index.html +1 -1
  48. unfold/templates/admin/login.html +9 -7
  49. unfold/templates/admin/nav_sidebar.html +11 -3
  50. unfold/templates/admin/object_history.html +4 -4
  51. unfold/templates/admin/pagination.html +18 -24
  52. unfold/templates/admin/search_form.html +3 -3
  53. unfold/templates/admin/submit_line.html +53 -56
  54. unfold/templates/auth/widgets/read_only_password_hash.html +1 -1
  55. unfold/templates/registration/logged_out.html +6 -8
  56. unfold/templates/registration/password_change_done.html +1 -1
  57. unfold/templates/registration/password_change_form.html +1 -1
  58. unfold/templates/unfold/components/button.html +1 -1
  59. unfold/templates/unfold/components/card.html +5 -5
  60. unfold/templates/unfold/components/chart/cohort.html +2 -2
  61. unfold/templates/unfold/components/navigation.html +2 -2
  62. unfold/templates/unfold/components/progress.html +1 -1
  63. unfold/templates/unfold/components/table.html +3 -3
  64. unfold/templates/unfold/components/tracker.html +1 -1
  65. unfold/templates/unfold/helpers/account_links.html +7 -7
  66. unfold/templates/unfold/helpers/actions_row.html +3 -3
  67. unfold/templates/unfold/helpers/app_list.html +7 -7
  68. unfold/templates/unfold/helpers/app_list_default.html +2 -2
  69. unfold/templates/unfold/helpers/change_list_actions.html +1 -1
  70. unfold/templates/unfold/helpers/change_list_filter.html +4 -4
  71. unfold/templates/unfold/helpers/change_list_filter_actions.html +5 -5
  72. unfold/templates/unfold/helpers/delete_submit_line.html +2 -2
  73. unfold/templates/unfold/helpers/display_dropdown.html +3 -3
  74. unfold/templates/unfold/helpers/display_header.html +1 -1
  75. unfold/templates/unfold/helpers/edit_inline/tabular_delete.html +1 -1
  76. unfold/templates/unfold/helpers/edit_inline/tabular_field.html +1 -1
  77. unfold/templates/unfold/helpers/edit_inline/tabular_row.html +1 -1
  78. unfold/templates/unfold/helpers/edit_inline/tabular_title.html +1 -1
  79. unfold/templates/unfold/helpers/empty_results.html +4 -4
  80. unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
  81. unfold/templates/unfold/helpers/fieldset_row_checkbox.html +2 -2
  82. unfold/templates/unfold/helpers/fieldset_row_field.html +1 -1
  83. unfold/templates/unfold/helpers/fieldsets_tabs.html +1 -1
  84. unfold/templates/unfold/helpers/header.html +3 -1
  85. unfold/templates/unfold/helpers/header_back_button.html +1 -1
  86. unfold/templates/unfold/helpers/history.html +2 -2
  87. unfold/templates/unfold/helpers/label.html +1 -1
  88. unfold/templates/unfold/helpers/language_switch.html +3 -3
  89. unfold/templates/unfold/helpers/messages/debug.html +1 -1
  90. unfold/templates/unfold/helpers/messages/error.html +1 -1
  91. unfold/templates/unfold/helpers/messages/errornote.html +1 -1
  92. unfold/templates/unfold/helpers/messages/info.html +1 -1
  93. unfold/templates/unfold/helpers/messages/success.html +1 -1
  94. unfold/templates/unfold/helpers/messages/warning.html +1 -1
  95. unfold/templates/unfold/helpers/messages.html +1 -1
  96. unfold/templates/unfold/helpers/navigation.html +10 -14
  97. unfold/templates/unfold/helpers/navigation_header.html +6 -4
  98. unfold/templates/unfold/helpers/pagination.html +7 -0
  99. unfold/templates/unfold/helpers/search.html +2 -2
  100. unfold/templates/unfold/helpers/search_results.html +1 -1
  101. unfold/templates/unfold/helpers/site_dropdown.html +2 -2
  102. unfold/templates/unfold/helpers/site_icon.html +6 -6
  103. unfold/templates/unfold/helpers/submit.html +1 -1
  104. unfold/templates/unfold/helpers/tab_action.html +5 -5
  105. unfold/templates/unfold/helpers/tab_actions.html +1 -1
  106. unfold/templates/unfold/helpers/tab_items.html +8 -8
  107. unfold/templates/unfold/helpers/tab_list.html +1 -1
  108. unfold/templates/unfold/helpers/theme_switch.html +8 -8
  109. unfold/templates/unfold/helpers/welcomemsg.html +3 -3
  110. unfold/templates/unfold/layouts/base_simple.html +3 -3
  111. unfold/templates/unfold/layouts/skeleton.html +2 -2
  112. unfold/templates/unfold/widgets/clearable_file_input.html +3 -3
  113. unfold/templates/unfold/widgets/clearable_file_input_small.html +5 -5
  114. unfold/templates/unfold/widgets/foreign_key_raw_id.html +5 -5
  115. unfold/templates/unfold/widgets/related_widget_wrapper.html +8 -8
  116. unfold/templates/unfold/widgets/split_datetime.html +2 -2
  117. unfold/templates/unfold_crispy/field.html +1 -1
  118. unfold/templates/unfold_crispy/inputs.html +1 -1
  119. unfold/templates/unfold_crispy/layout/checkbox.html +1 -1
  120. unfold/templates/unfold_crispy/layout/fieldset.html +1 -1
  121. unfold/templates/unfold_crispy/layout/table_inline_formset.html +2 -2
  122. unfold/templatetags/unfold.py +23 -9
  123. unfold/widgets.py +29 -34
  124. {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) or self.site_title,
86
- "site_header": self._get_config("SITE_HEADER", request) or self.site_header,
87
- "site_url": self._get_config("SITE_URL", request) or self.site_url,
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