django-unfold 0.33.0__py3-none-any.whl → 0.34.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. {django_unfold-0.33.0.dist-info → django_unfold-0.34.0.dist-info}/METADATA +17 -1
  2. {django_unfold-0.33.0.dist-info → django_unfold-0.34.0.dist-info}/RECORD +68 -68
  3. unfold/admin.py +5 -9
  4. unfold/contrib/filters/templates/unfold/filters/filters_date_range.html +1 -1
  5. unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html +1 -1
  6. unfold/contrib/filters/templates/unfold/filters/filters_numeric_range.html +1 -1
  7. unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html +1 -1
  8. unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +1 -1
  9. unfold/contrib/guardian/templates/unfold/guardian/group_form.html +10 -10
  10. unfold/contrib/guardian/templates/unfold/guardian/user_form.html +10 -10
  11. unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +1 -1
  12. unfold/contrib/import_export/templates/admin/import_export/import_errors.html +3 -3
  13. unfold/contrib/import_export/templates/admin/import_export/import_preview.html +6 -6
  14. unfold/contrib/import_export/templates/admin/import_export/import_validation.html +8 -8
  15. unfold/contrib/simple_history/templates/simple_history/object_history_list.html +18 -18
  16. unfold/fields.py +2 -2
  17. unfold/forms.py +2 -1
  18. unfold/static/unfold/css/styles.css +1 -1
  19. unfold/styles.css +6 -10
  20. unfold/templates/admin/actions.html +14 -12
  21. unfold/templates/admin/app_list.html +3 -5
  22. unfold/templates/admin/change_list.html +4 -4
  23. unfold/templates/admin/change_list_results.html +4 -4
  24. unfold/templates/admin/delete_confirmation.html +9 -9
  25. unfold/templates/admin/delete_selected_confirmation.html +9 -9
  26. unfold/templates/admin/edit_inline/stacked.html +64 -58
  27. unfold/templates/admin/edit_inline/tabular.html +11 -11
  28. unfold/templates/admin/filter.html +5 -5
  29. unfold/templates/admin/includes/object_delete_summary.html +2 -2
  30. unfold/templates/admin/object_history.html +9 -9
  31. unfold/templates/admin/pagination.html +3 -3
  32. unfold/templates/admin/submit_line.html +7 -7
  33. unfold/templates/unfold/change_list_filter.html +3 -3
  34. unfold/templates/unfold/components/progress.html +1 -1
  35. unfold/templates/unfold/components/table.html +4 -4
  36. unfold/templates/unfold/components/title.html +1 -1
  37. unfold/templates/unfold/helpers/account_links.html +2 -2
  38. unfold/templates/unfold/helpers/actions_row.html +14 -12
  39. unfold/templates/unfold/helpers/add_link.html +2 -2
  40. unfold/templates/unfold/helpers/app_list.html +7 -7
  41. unfold/templates/unfold/helpers/app_list_default.html +7 -7
  42. unfold/templates/unfold/helpers/breadcrumb_item.html +1 -1
  43. unfold/templates/unfold/helpers/display_header.html +4 -2
  44. unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
  45. unfold/templates/unfold/helpers/fieldset_row.html +1 -1
  46. unfold/templates/unfold/helpers/fieldsets_tabs.html +1 -1
  47. unfold/templates/unfold/helpers/help_text.html +1 -1
  48. unfold/templates/unfold/helpers/history.html +3 -3
  49. unfold/templates/unfold/helpers/label.html +6 -6
  50. unfold/templates/unfold/helpers/messages.html +12 -1
  51. unfold/templates/unfold/helpers/navigation.html +1 -1
  52. unfold/templates/unfold/helpers/search_results.html +2 -2
  53. unfold/templates/unfold/helpers/site_icon.html +1 -1
  54. unfold/templates/unfold/helpers/tab_action.html +1 -1
  55. unfold/templates/unfold/helpers/tab_list.html +9 -5
  56. unfold/templates/unfold/helpers/theme_switch.html +2 -2
  57. unfold/templates/unfold/helpers/welcomemsg.html +5 -3
  58. unfold/templates/unfold/layouts/skeleton.html +2 -2
  59. unfold/templates/unfold/widgets/clearable_file_input.html +2 -2
  60. unfold/templates/unfold/widgets/clearable_file_input_small.html +2 -2
  61. unfold/templates/unfold/widgets/foreign_key_raw_id.html +8 -4
  62. unfold/templates/unfold/widgets/radio_option.html +1 -1
  63. unfold/templates/unfold/widgets/split_datetime.html +2 -2
  64. unfold/templates/unfold/widgets/split_datetime_vertical.html +2 -2
  65. unfold/templatetags/unfold_list.py +6 -7
  66. unfold/widgets.py +10 -5
  67. {django_unfold-0.33.0.dist-info → django_unfold-0.34.0.dist-info}/LICENSE.md +0 -0
  68. {django_unfold-0.33.0.dist-info → django_unfold-0.34.0.dist-info}/WHEEL +0 -0
@@ -15,19 +15,19 @@
15
15
  </div>
16
16
  </div>
17
17
 
18
- <table class="border-gray-200 border-spacing-none border-separate text-gray-700 w-full dark:text-gray-300 lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
19
- <thead class="hidden lg:table-header-group">
18
+ <table class="border-gray-200 border-spacing-none border-separate w-full lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
19
+ <thead class="hidden lg:table-header-group font-semibold text-gray-900 dark:text-gray-100">
20
20
  <tr>
21
- <th class="align-middle capitalize font-medium px-3 py-2 text-left text-gray-400 text-sm">
21
+ <th class="align-middle capitalize px-3 py-2 text-left">
22
22
  {% trans "Row" %}
23
23
  </th>
24
24
 
25
- <th class="align-middle capitalize font-medium px-3 py-2 text-left text-gray-400 text-sm">
25
+ <th class="align-middle capitalize px-3 py-2 text-left">
26
26
  {% trans "Errors" %}
27
27
  </th>
28
28
 
29
29
  {% for field in result.diff_headers %}
30
- <th class="align-middle capitalize font-medium px-3 py-2 text-left text-gray-400 text-sm">
30
+ <th class="align-middle capitalize px-3 py-2 text-left">
31
31
  {{ field }}
32
32
  </th>
33
33
  {% endfor %}
@@ -37,11 +37,11 @@
37
37
  <tbody>
38
38
  {% for row in result.invalid_rows %}
39
39
  <tr class="{% cycle '' 'bg-gray-50 dark:bg-white/[.02]' %} block border mb-3 rounded-md shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-gray-800">
40
- <td data-label="{% trans "Row" %}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 dark:before:text-gray-300 lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
40
+ <td data-label="{% trans "Row" %}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
41
41
  {{ row.number }}
42
42
  </td>
43
43
 
44
- <td data-label="{% trans "Errors" %}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 dark:before:text-gray-300 lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
44
+ <td data-label="{% trans "Errors" %}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
45
45
  <div>
46
46
  <span class="bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white">{{ row.error_count }}</span>
47
47
  </div>
@@ -77,7 +77,7 @@
77
77
  </td>
78
78
 
79
79
  {% for field in row.values %}
80
- <td data-label="{{ result.diff_headers|index:forloop.counter0 }}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 dark:before:text-gray-300 lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
80
+ <td data-label="{{ result.diff_headers|index:forloop.counter0 }}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800">
81
81
  {{ field }}
82
82
  </td>
83
83
  {% endfor %}
@@ -3,36 +3,36 @@
3
3
  {% load admin_urls %}
4
4
  {% load getattribute from getattributes %}
5
5
 
6
- <table id="change-history" class="border-gray-200 border-spacing-none border-separate mb-6 text-gray-700 w-full dark:text-gray-300 lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
7
- <thead class="hidden lg:table-header-group">
6
+ <table id="change-history" class="border-gray-200 border-spacing-none border-separate mb-6 w-full lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
7
+ <thead class="hidden text-gray-900 lg:table-header-group dark:text-gray-100">
8
8
  <tr>
9
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
9
+ <th class="align-middle font-medium px-3 py-2 text-left ">
10
10
  {% trans 'Object' %}
11
11
  </th>
12
12
 
13
13
  {% for column in history_list_display %}
14
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
14
+ <th class="align-middle font-medium px-3 py-2 text-left ">
15
15
  {% trans column %}
16
16
  </th>
17
17
  {% endfor %}
18
18
 
19
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
19
+ <th class="align-middle font-medium px-3 py-2 text-left">
20
20
  {% trans 'Date/time' %}
21
21
  </th>
22
22
 
23
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
23
+ <th class="align-middle font-medium px-3 py-2 text-left">
24
24
  {% trans 'Comment' %}
25
25
  </th>
26
26
 
27
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
27
+ <th class="align-middle font-medium px-3 py-2 text-left">
28
28
  {% trans 'Changed by' %}
29
29
  </th>
30
30
 
31
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
31
+ <th class="align-middle font-medium px-3 py-2 text-left">
32
32
  {% trans 'Change reason' %}
33
33
  </th>
34
34
 
35
- <th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
35
+ <th class="align-middle font-medium px-3 py-2 text-left">
36
36
  {% trans 'Changes' %}
37
37
  </th>
38
38
  </tr>
@@ -41,27 +41,27 @@
41
41
  <tbody>
42
42
  {% for record in historical_records %}
43
43
  <tr class="block border mb-3 rounded-md shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-gray-800">
44
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Object' %}">
44
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Object' %}">
45
45
  <a href="{% url opts|admin_urlname:'simple_history' object.pk record.pk %}">
46
46
  {{ record.history_object }}
47
47
  </a>
48
48
  </td>
49
49
 
50
50
  {% for column in history_list_display %}
51
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans column %}">
51
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans column %}">
52
52
  {{ record|getattribute:column }}
53
53
  </th>
54
54
  {% endfor %}
55
55
 
56
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Date/time' %}">
56
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Date/time' %}">
57
57
  {{ record.history_date }}
58
58
  </td>
59
59
 
60
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Comment' %}">
60
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Comment' %}">
61
61
  {{ record.get_history_type_display }}
62
62
  </td>
63
63
 
64
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Changed by' %}">
64
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Changed by' %}">
65
65
  {% if record.history_user %}
66
66
  {% url admin_user_view record.history_user_id as admin_user_url %}
67
67
 
@@ -75,17 +75,17 @@
75
75
  {% endif %}
76
76
  </td>
77
77
 
78
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Change reason' %}">
78
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Change reason' %}">
79
79
  {{ record.history_change_reason }}
80
80
  </td>
81
81
 
82
- <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Changes' %}">
82
+ <td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% trans 'Changes' %}">
83
83
  {% block history_delta_changes %}
84
84
  {% if record.history_delta_changes %}
85
85
  <ul>
86
86
  {% for change in record.history_delta_changes %}
87
87
  <li class="flex flex-row gap-2">
88
- <strong class="font-medium text-gray-700 dark:text-gray-200">
88
+ <strong class="font-medium">
89
89
  {{ change.field }}:
90
90
  </strong>
91
91
 
@@ -97,7 +97,7 @@
97
97
  {% endif %}
98
98
 
99
99
  {% if change.old and change.new %}
100
- <span class="align-text-top material-symbols-outlined md-18 text-gray-300 group-hover:text-gray-300 dark:text-gray-600">arrow_right_alt</span>
100
+ <span class="align-text-top material-symbols-outlined md-18 ">arrow_right_alt</span>
101
101
  {% endif %}
102
102
 
103
103
  {% if change.new %}
unfold/fields.py CHANGED
@@ -95,7 +95,7 @@ class UnfoldAdminReadonlyField(helpers.AdminReadonlyField):
95
95
  current_app=self.model_admin.admin_site.name,
96
96
  )
97
97
  return format_html(
98
- '<a href="{}" class="text-primary-600 underline dark:text-primary-500">{}</a>',
98
+ '<a href="{}" class="text-primary-600 dark:text-primary-500">{}</a>',
99
99
  url,
100
100
  remote_obj,
101
101
  )
@@ -148,7 +148,7 @@ class UnfoldAdminReadonlyField(helpers.AdminReadonlyField):
148
148
  return conditional_escape(result_repr)
149
149
  elif isinstance(f, models.URLField):
150
150
  return format_html(
151
- '<a href="{}" class="text-primary-600 underline whitespace-nowrap dark:text-primary-500">{}</a>',
151
+ '<a href="{}" class="text-primary-600 dark:text-primary-500">{}</a>',
152
152
  value,
153
153
  value,
154
154
  )
unfold/forms.py CHANGED
@@ -36,6 +36,7 @@ class ActionForm(forms.Form):
36
36
  widget=forms.Select(
37
37
  {
38
38
  "class": " ".join([*SELECT_CLASSES, "max-w-full", "lg:!w-64"]),
39
+ "aria-label": _("Select action to run"),
39
40
  "x-model": "action",
40
41
  }
41
42
  ),
@@ -97,7 +98,7 @@ class UserChangeForm(BaseUserChangeForm):
97
98
  self.fields["password"].help_text = _(
98
99
  "Raw passwords are not stored, so there is no way to see this "
99
100
  "user’s password, but you can change the password using "
100
- '<a href="{}" class="text-primary-600 underline whitespace-nowrap dark:text-primary-500">this form</a>.'
101
+ '<a href="{}" class="text-primary-600 dark:text-primary-500">this form</a>.'
101
102
  )
102
103
 
103
104
  password = self.fields.get("password")