django-unfold 0.62.0__py3-none-any.whl → 0.63.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.62.0.dist-info → django_unfold-0.63.0.dist-info}/METADATA +15 -2
- {django_unfold-0.62.0.dist-info → django_unfold-0.63.0.dist-info}/RECORD +24 -19
- unfold/contrib/constance/__init__.py +0 -0
- unfold/contrib/constance/apps.py +6 -0
- unfold/contrib/constance/settings.py +32 -0
- unfold/contrib/constance/templates/admin/constance/change_list.html +70 -0
- unfold/contrib/constance/templates/admin/constance/includes/results_list.html +71 -0
- unfold/fields.py +1 -1
- unfold/static/admin/js/inlines.js +42 -17
- unfold/static/unfold/css/styles.css +2 -2
- unfold/static/unfold/js/select2.init.js +4 -0
- unfold/styles.css +1 -1
- unfold/templates/admin/change_form.html +7 -1
- unfold/templates/admin/includes/fieldset.html +1 -1
- unfold/templates/admin/login.html +1 -1
- unfold/templates/registration/logged_out.html +12 -7
- unfold/templates/unfold/helpers/pagination_inline.html +28 -20
- unfold/templates/unfold/helpers/submit.html +1 -1
- unfold/templates/unfold/helpers/unauthenticated_header.html +2 -2
- unfold/templates/unfold/helpers/unauthenticated_title.html +1 -1
- unfold/templates/unfold/widgets/related_widget_wrapper.html +4 -4
- unfold/widgets.py +6 -1
- {django_unfold-0.62.0.dist-info → django_unfold-0.63.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.62.0.dist-info → django_unfold-0.63.0.dist-info}/WHEEL +0 -0
unfold/styles.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
}
|
10
10
|
}
|
11
11
|
|
12
|
-
@source inline("h-3 w-3 h-[64px] w-[65px]! left-[65px] dark:hover:bg-white/[.06] translate-x-1/4 -translate-y-1/4");
|
12
|
+
@source inline("bg-white/[.06] border-white/40 h-3 w-3 h-[64px] w-[65px]! left-[65px] {dark:,}text-base-{50,{100..900},950} dark:hover:bg-white/[.06] translate-x-1/4 -translate-y-1/4");
|
13
13
|
@source inline("{-,}{top,bottom,left,right}-{0..6}");
|
14
14
|
@source inline("rounded rounded-{t,r,b,l} rounded-{t,r,b,l}-default");
|
15
15
|
@source inline("{md:,lg:,2xl:,}relative {md:,lg:,2xl:,}flex {md:,lg:,2xl:,}absolute {md:,lg:,2xl:,}sticky");
|
@@ -104,7 +104,13 @@
|
|
104
104
|
|
105
105
|
{% block inline_field_sets %}
|
106
106
|
{% for inline_admin_formset in inline_admin_formsets %}
|
107
|
-
{%
|
107
|
+
{% if request.headers.hx_request %}
|
108
|
+
{% if inline_admin_formset.formset.get_pagination_key in request.GET %}
|
109
|
+
{% include inline_admin_formset.opts.template %}
|
110
|
+
{% endif %}
|
111
|
+
{% else %}
|
112
|
+
{% include inline_admin_formset.opts.template %}
|
113
|
+
{% endif %}
|
108
114
|
{% endfor %}
|
109
115
|
{% endblock %}
|
110
116
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
{{ fieldset.name }}
|
10
10
|
</h2>
|
11
11
|
{% else %}
|
12
|
-
<h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm
|
12
|
+
<h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm @min-[1570px]:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark {% if fieldset.is_collapsible %}cursor-pointer{% endif %}">
|
13
13
|
{{ fieldset.name }}
|
14
14
|
</h2>
|
15
15
|
{% endif %}
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
<div class="flex flex-col gap-3 mt-6">
|
46
46
|
{% component "unfold/components/button.html" with submit=1 variant="primary" class="submit-row w-full" %}
|
47
|
-
{% translate 'Log in' %} <span class="material-symbols-outlined
|
47
|
+
{% translate 'Log in' %} <span class="material-symbols-outlined relative right-0 transition-all group-hover:-right-1 text-sm">arrow_forward</span>
|
48
48
|
{% endcomponent %}
|
49
49
|
|
50
50
|
{% url 'admin_password_reset' as password_reset_url %}
|
@@ -1,8 +1,12 @@
|
|
1
|
-
{% extends
|
1
|
+
{% extends 'unfold/layouts/unauthenticated.html' %}
|
2
2
|
|
3
|
-
{% load i18n %}
|
3
|
+
{% load i18n unfold %}
|
4
4
|
|
5
|
-
{% block
|
5
|
+
{% block title %}
|
6
|
+
{{ title }} | {{ site_title }}
|
7
|
+
{% endblock %}
|
8
|
+
|
9
|
+
{% block content %}
|
6
10
|
<div id="page" class="bg-white flex min-h-screen dark:bg-base-900 ">
|
7
11
|
<div class="flex grow items-center justify-center mx-auto px-4">
|
8
12
|
<div class="w-full sm:w-96">
|
@@ -11,12 +15,13 @@
|
|
11
15
|
</h1>
|
12
16
|
|
13
17
|
<p class="leading-relaxed mb-10">
|
14
|
-
{%
|
18
|
+
{% trans "Thanks for spending some quality time with the web site today." %}
|
15
19
|
</p>
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
|
21
|
+
{% url "admin:index" as login_url %}
|
22
|
+
{% component "unfold/components/button.html" with href=login_url variant="primary" class="w-full" %}
|
23
|
+
{% trans "Log in again" %} <span class="material-symbols-outlined relative right-0 transition-all group-hover:-right-1 text-sm">arrow_forward</span>
|
24
|
+
{% endcomponent %}
|
20
25
|
</div>
|
21
26
|
</div>
|
22
27
|
</div>
|
@@ -1,28 +1,36 @@
|
|
1
1
|
{% load i18n admin_urls unfold %}
|
2
2
|
|
3
|
-
{% with page_obj=inline_admin_formset.formset.page has_tab=inline_admin_formset.opts.tab pagination_key=inline_admin_formset.formset.get_pagination_key %}
|
4
|
-
{%
|
5
|
-
|
3
|
+
{% with page_obj=inline_admin_formset.formset.page has_tab=inline_admin_formset.opts.tab pagination_key=inline_admin_formset.formset.get_pagination_key per_page=inline_admin_formset.opts.per_page %}
|
4
|
+
{% if pagination_key and per_page %}
|
5
|
+
{% elided_page_range page_obj.paginator page_obj.number as elided_page_range %}
|
6
6
|
|
7
|
-
|
8
|
-
<div class="flex items-center gap-2 mb-6">
|
9
|
-
{% for i in elided_page_range %}
|
10
|
-
{% if i == page_obj.paginator.ELLIPSIS %}
|
11
|
-
<span>{{ page_obj.paginator.ELLIPSIS }}</span>
|
12
|
-
{% elif i == page_obj.number %}
|
13
|
-
<span class="font-medium text-primary-600">{{ i }}</span>
|
14
|
-
{% else %}
|
15
|
-
<a href="?{% querystring_params pagination_key i %}{% if has_tab %}#{{ inline_admin_formset.formset.prefix|slugify }}{% endif %}">
|
16
|
-
{{ i }}
|
17
|
-
</a>
|
18
|
-
{% endif %}
|
19
|
-
{% endfor %}
|
7
|
+
<input type="hidden" name="{{ pagination_key }}" value="{{ page_obj.number }}" />
|
20
8
|
|
21
|
-
|
9
|
+
{% if page_obj.paginator.count and page_obj.paginator.num_pages > 1 %}
|
10
|
+
<div class="flex items-center gap-2 mt-6">
|
11
|
+
{% for i in elided_page_range %}
|
12
|
+
{% if i == page_obj.paginator.ELLIPSIS %}
|
13
|
+
<span>{{ page_obj.paginator.ELLIPSIS }}</span>
|
14
|
+
{% elif i == page_obj.number %}
|
15
|
+
<span class="font-medium text-primary-600">{{ i }}</span>
|
16
|
+
{% else %}
|
17
|
+
<a class="cursor-pointer"
|
18
|
+
hx-get="?{% querystring_params pagination_key i %}{% if has_tab %}#{{ inline_admin_formset.formset.prefix|slugify }}{% endif %}"
|
19
|
+
hx-push-url="true"
|
20
|
+
hx-swap="outerHTML"
|
21
|
+
hx-select="#{{ inline_admin_formset.formset.prefix }}-group"
|
22
|
+
hx-target="#{{ inline_admin_formset.formset.prefix }}-group">
|
23
|
+
{{ i }}
|
24
|
+
</a>
|
25
|
+
{% endif %}
|
26
|
+
{% endfor %}
|
22
27
|
|
23
|
-
|
24
|
-
|
28
|
+
<div>-</div>
|
29
|
+
|
30
|
+
<div>
|
31
|
+
{{ page_obj.paginator.count }} {% if page_obj.paginator.count == 1 %}{{ inline_admin_formset.opts.verbose_name }}{% else %}{{ inline_admin_formset.opts.verbose_name_plural }}{% endif %}
|
32
|
+
</div>
|
25
33
|
</div>
|
26
|
-
|
34
|
+
{% endif %}
|
27
35
|
{% endif %}
|
28
36
|
{% endwith %}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<button type="submit" {% if name %}name="{{ name}}"{% endif %} class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-default self-end text-sm text-white">
|
1
|
+
<button type="submit" {% if name %}name="{{ name}}"{% endif %} class="bg-primary-600 block border border-transparent cursor-pointer font-medium px-3 py-2 rounded-default self-end text-sm text-white">
|
2
2
|
{{ title }}
|
3
3
|
</button>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
<div class="absolute flex flex-row items-center justify-between left-0 m-4 right-0 top-0">
|
4
4
|
{% if site_url %}
|
5
|
-
<a href="{{ site_url }}" class="flex font-medium items-center text-sm text-primary-600 dark:text-primary-500">
|
6
|
-
<span class="material-symbols-outlined
|
5
|
+
<a href="{{ site_url }}" class="flex font-medium gap-2 group items-center text-sm text-primary-600 dark:text-primary-500">
|
6
|
+
<span class="material-symbols-outlined left-0 relative text-sm transition-all group-hover:-left-1">arrow_back</span> {% trans 'Return to site' %}
|
7
7
|
</a>
|
8
8
|
{% endif %}
|
9
9
|
|
@@ -6,6 +6,6 @@
|
|
6
6
|
<span class="block text-font-important-light dark:text-font-important-dark">{{ subtitle }} </span>
|
7
7
|
{% endif %}
|
8
8
|
|
9
|
-
<span class="block text-primary-600 text-xl dark:text-primary-500">{{ title }}</span>
|
9
|
+
<span class="block font-semibold text-primary-600 tracking-tight text-xl dark:text-primary-500">{{ title }}</span>
|
10
10
|
</h1>
|
11
11
|
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
{% if not is_hidden %}
|
10
10
|
{% if can_add_related or can_change_related or can_delete_related or can_view_related%}
|
11
11
|
{% if can_change_related %}
|
12
|
-
<a class="related-widget-wrapper-link change-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-base-400 text-sm w-[38px] hover:text-base-700 dark:bg-base-900 dark:border-base-700 dark:text-base-500 dark:hover:text-base-200"
|
12
|
+
<a class="related-widget-wrapper-link change-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-base-400 text-sm w-[38px] hover:text-base-700 dark:bg-base-900 dark:border-base-700 dark:text-base-500 dark:hover:text-base-200 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-600"
|
13
13
|
id="change_id_{{ name }}"
|
14
14
|
data-popup="yes"
|
15
15
|
data-href-template="{{ change_related_template_url }}?{{ url_params }}"
|
@@ -19,7 +19,7 @@
|
|
19
19
|
{% endif %}
|
20
20
|
|
21
21
|
{% if can_add_related %}
|
22
|
-
<a class="related-widget-wrapper-link add-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-base-400 text-sm w-[38px] hover:text-base-700 dark:bg-base-900 dark:border-base-700 dark:text-base-500 dark:hover:text-base-200"
|
22
|
+
<a class="related-widget-wrapper-link add-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-base-400 text-sm w-[38px] hover:text-base-700 dark:bg-base-900 dark:border-base-700 dark:text-base-500 dark:hover:text-base-200 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-600"
|
23
23
|
data-popup="yes"
|
24
24
|
id="add_id_{{ name }}"
|
25
25
|
href="{{ add_related_url }}?{{ url_params }}"
|
@@ -29,7 +29,7 @@
|
|
29
29
|
{% endif %}
|
30
30
|
|
31
31
|
{% if can_view_related %}
|
32
|
-
<a class="related-widget-wrapper-link view-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-base-400 text-sm w-[38px] hover:text-base-700 dark:bg-base-900 dark:border-base-700 dark:text-base-500 dark:hover:text-base-200"
|
32
|
+
<a class="related-widget-wrapper-link view-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-base-400 text-sm w-[38px] hover:text-base-700 dark:bg-base-900 dark:border-base-700 dark:text-base-500 dark:hover:text-base-200 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-600"
|
33
33
|
id="view_id_{{ name }}"
|
34
34
|
data-href-template="{{ change_related_template_url }}?{{ view_related_url_params }}"
|
35
35
|
title="{% blocktranslate %}View selected {{ model }}{% endblocktranslate %}">
|
@@ -38,7 +38,7 @@
|
|
38
38
|
{% endif %}
|
39
39
|
|
40
40
|
{% if can_delete_related %}
|
41
|
-
<a class="related-widget-wrapper-link delete-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-red-600 text-sm w-[38px] dark:bg-base-900 dark:border-base-700 dark:text-red-500"
|
41
|
+
<a class="related-widget-wrapper-link delete-related bg-white border border-base-200 cursor-pointer flex items-center h-[38px] justify-center ml-2 rounded-default shadow-xs shrink-0 text-red-600 text-sm w-[38px] dark:bg-base-900 dark:border-base-700 dark:text-red-500 focus:outline-2 focus:-outline-offset-2 focus:outline-red-500"
|
42
42
|
id="delete_id_{{ name }}"
|
43
43
|
data-href-template="{{ delete_related_template_url }}?{{ url_params }}"
|
44
44
|
data-popup="yes"
|
unfold/widgets.py
CHANGED
@@ -244,13 +244,17 @@ RADIO_CLASSES = [
|
|
244
244
|
SWITCH_CLASSES = [
|
245
245
|
"appearance-none",
|
246
246
|
"bg-base-300",
|
247
|
+
"block",
|
247
248
|
"cursor-pointer",
|
248
249
|
"h-5",
|
249
250
|
"relative",
|
250
251
|
"rounded-full",
|
251
|
-
"transition-
|
252
|
+
"transition-colors",
|
252
253
|
"w-8",
|
253
254
|
"min-w-8",
|
255
|
+
"focus:outline-2",
|
256
|
+
"focus:outline-offset-2",
|
257
|
+
"focus:outline-primary-600",
|
254
258
|
"after:absolute",
|
255
259
|
"after:bg-white",
|
256
260
|
"after:content-['']",
|
@@ -258,6 +262,7 @@ SWITCH_CLASSES = [
|
|
258
262
|
"after:h-3",
|
259
263
|
"after:rounded-full",
|
260
264
|
"after:shadow-xs",
|
265
|
+
"after:transition-all",
|
261
266
|
"after:left-1",
|
262
267
|
"after:top-1",
|
263
268
|
"after:w-3",
|
File without changes
|
File without changes
|