accrete 0.0.129__py3-none-any.whl → 0.0.131__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.
- accrete/contrib/ui/__init__.py +1 -0
- accrete/contrib/ui/templates/ui/layout.html +3 -0
- accrete/contrib/ui/templates/ui/list.html +0 -4
- accrete/contrib/ui/utils.py +17 -0
- accrete/contrib/user/templates/user/user_form.html +3 -4
- accrete/contrib/user/views.py +2 -8
- {accrete-0.0.129.dist-info → accrete-0.0.131.dist-info}/METADATA +1 -1
- {accrete-0.0.129.dist-info → accrete-0.0.131.dist-info}/RECORD +10 -9
- {accrete-0.0.129.dist-info → accrete-0.0.131.dist-info}/WHEEL +0 -0
- {accrete-0.0.129.dist-info → accrete-0.0.131.dist-info}/licenses/LICENSE +0 -0
accrete/contrib/ui/__init__.py
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
from django.http import HttpRequest, HttpResponse
|
2
|
+
from django.shortcuts import render
|
3
|
+
from .context import ModalContext
|
4
|
+
|
5
|
+
|
6
|
+
def update_modal(
|
7
|
+
request: HttpRequest,
|
8
|
+
template: str,
|
9
|
+
context: ModalContext | dict
|
10
|
+
) -> HttpResponse:
|
11
|
+
|
12
|
+
if isinstance(context, ModalContext):
|
13
|
+
context = context.dict()
|
14
|
+
res = render(request, template, context)
|
15
|
+
res.headers['HX-Retarget'] = f'#{context["modal_id"]}'
|
16
|
+
res.headers['HX-Reswap'] = 'outerHTML'
|
17
|
+
return res
|
@@ -1,12 +1,11 @@
|
|
1
1
|
{% extends 'ui/layout.html' %}
|
2
2
|
{% load i18n %}
|
3
3
|
|
4
|
-
{% block
|
5
|
-
{
|
6
|
-
<button class="button p-2 my-1 mr-1 is-light" hx-get="{% url 'user:change_password' %}" hx-target="body" hx-swap="beforeend">
|
4
|
+
{% block header_left_buttons %}
|
5
|
+
<button class="button is-light" hx-get="{% url 'user:change_password' %}" hx-target="body" hx-swap="beforeend">
|
7
6
|
<span>{% translate 'Change Password' %}</span>
|
8
7
|
</button>
|
9
|
-
<button class="button
|
8
|
+
<button class="button is-light" hx-get="{% url 'user:change_email' %}" hx-target="body" hx-swap="beforeend">
|
10
9
|
<span>{% translate 'Change E-Mail' %}</span>
|
11
10
|
</button>
|
12
11
|
{% endblock %}
|
accrete/contrib/user/views.py
CHANGED
@@ -77,10 +77,7 @@ def user_change_password(request):
|
|
77
77
|
+ f'?{request.GET.urlencode()}'
|
78
78
|
)
|
79
79
|
ctx.update(form=form)
|
80
|
-
|
81
|
-
res.headers['HX-Retarget'] = f'#{ctx["modal_id"]}'
|
82
|
-
res.headers['HX-Reswap'] = 'outerHTML'
|
83
|
-
return res
|
80
|
+
return ui.update_modal(request, 'user/change_password.html', ctx)
|
84
81
|
return render(request, 'user/change_password.html', ctx)
|
85
82
|
|
86
83
|
|
@@ -101,8 +98,5 @@ def user_change_email(request):
|
|
101
98
|
if form.is_saved:
|
102
99
|
return redirect('user:detail')
|
103
100
|
ctx.update(form=form)
|
104
|
-
|
105
|
-
res.headers['HX-Retarget'] = f'#{ctx["modal_id"]}'
|
106
|
-
res.headers['HX-Reswap'] = 'outerHTML'
|
107
|
-
return res
|
101
|
+
return ui.update_modal(request, 'user/change_email.html', ctx)
|
108
102
|
return render(request, 'user/change_email.html', ctx)
|
@@ -60,7 +60,7 @@ accrete/contrib/system_mail/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2
|
|
60
60
|
accrete/contrib/system_mail/views.py,sha256=xc1IQHrsij7j33TUbo-_oewy3vs03pw_etpBWaMYJl0,63
|
61
61
|
accrete/contrib/system_mail/migrations/0001_initial.py,sha256=6cwkkRXGjXvwXoMjjgmWmcPyXSTlUbhW1vMiHObk9MQ,1074
|
62
62
|
accrete/contrib/system_mail/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
63
|
-
accrete/contrib/ui/__init__.py,sha256=
|
63
|
+
accrete/contrib/ui/__init__.py,sha256=n24ecHNTZgyXWhJXLg1P8AAwZKgm5ga3m9yeI-Z2GMs,216
|
64
64
|
accrete/contrib/ui/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
|
65
65
|
accrete/contrib/ui/apps.py,sha256=E0ao2ox6PQ3ldfeR17FXJUUJuGiWjm2DPCxHbPXGzls,152
|
66
66
|
accrete/contrib/ui/context.py,sha256=MLITEVZndD_3QZ4nnBT4Bpl9s1bc7RZ3d6LlQKMM54Q,1922
|
@@ -69,6 +69,7 @@ accrete/contrib/ui/middleware.py,sha256=QprWR8FXK9iMPIvLQAeYASaUJSW0uD9BHoYroMKr
|
|
69
69
|
accrete/contrib/ui/models.py,sha256=Vjc0p2XbAPgE6HyTF6vll98A4eDhA5AvaQqsc4kQ9AQ,57
|
70
70
|
accrete/contrib/ui/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
71
71
|
accrete/contrib/ui/urls.py,sha256=5XUfK85HYWYf7oopMoJEEYmQ6pNgHgZBErBEn97pBt4,337
|
72
|
+
accrete/contrib/ui/utils.py,sha256=WmifdFOuFygGqtHBauAlUw88LTkS4wUZTIy0Vr7cyYg,475
|
72
73
|
accrete/contrib/ui/views.py,sha256=5VUbP0jgMcLMv9-3AKxkV315RA0qXuw5PmTRejPc0Yg,1136
|
73
74
|
accrete/contrib/ui/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
74
75
|
accrete/contrib/ui/static/bulma/LICENSE,sha256=--fY7Bi3Lt7RXXnKc9pe756OJY9fGv-D5OmT5pdSJ5w,1080
|
@@ -197,8 +198,8 @@ accrete/contrib/ui/templates/django/forms/widgets/text.html,sha256=MSmLlQc7PsPoD
|
|
197
198
|
accrete/contrib/ui/templates/django/forms/widgets/textarea.html,sha256=c9BTedqb3IkXLyVYd0p9pR8DFnsXCNGoxVBWZTk_Fic,278
|
198
199
|
accrete/contrib/ui/templates/ui/content_right.html,sha256=XUF1tYpSKfO9FleYtJ2QmWPmwdLYxLHXdBLRa-BrFUs,221
|
199
200
|
accrete/contrib/ui/templates/ui/form_error.html,sha256=uA8FLdZyeU0vXJHlGK3rcBqcmXb63MLPV32uQyUTak4,348
|
200
|
-
accrete/contrib/ui/templates/ui/layout.html,sha256=
|
201
|
-
accrete/contrib/ui/templates/ui/list.html,sha256=
|
201
|
+
accrete/contrib/ui/templates/ui/layout.html,sha256=QTkcHPwOLdNq_HpT3AYUUCsH9yjINeN0QNbIkjFwQ8Y,12889
|
202
|
+
accrete/contrib/ui/templates/ui/list.html,sha256=XLcZn7H3DAwCzwd5ejd5IWLFhWhXUtIhj2OvLq2cjtE,2188
|
202
203
|
accrete/contrib/ui/templates/ui/list_update.html,sha256=mLQTCgkKfVI5jrgei-Upc1u87iXL0Q63uLzXHPwMyeo,110
|
203
204
|
accrete/contrib/ui/templates/ui/message.html,sha256=t3bZ5EE7IgQYJroCdLKFeUkZiNbgKkErVYQm6Y3IKpg,532
|
204
205
|
accrete/contrib/ui/templates/ui/modal.html,sha256=9Gnj5qhIJrnAPgAuIUkrSWeuYyKppywvmK1483AMhxY,1870
|
@@ -225,7 +226,7 @@ accrete/contrib/user/middleware.py,sha256=qblcujwJsthopagyT-hPFq4HsMyGt-VvqZw5TQ
|
|
225
226
|
accrete/contrib/user/models.py,sha256=9U7SPbR9IuXhEVdlncsPOZdcbPoWcHRcQi3i25y07Hc,4331
|
226
227
|
accrete/contrib/user/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
227
228
|
accrete/contrib/user/urls.py,sha256=_fBa--3NfyYN10Td7PGHpetJYy42SMqTyCCXhgynkEQ,407
|
228
|
-
accrete/contrib/user/views.py,sha256=
|
229
|
+
accrete/contrib/user/views.py,sha256=uP2n-ixb13JYLpfWoSxg6Xl-Kfcn5oxowJhqIn9ld4c,3217
|
229
230
|
accrete/contrib/user/locale/de/LC_MESSAGES/django.mo,sha256=p3rgUg6WltAVIMkQsjvjBqTsd_usLhSr1GH4Cyltc2c,433
|
230
231
|
accrete/contrib/user/locale/de/LC_MESSAGES/django.po,sha256=f_Nxpo3HTm2L3f3zoHLfeWsZ-4IQp_EEVSku6TCZSvw,1870
|
231
232
|
accrete/contrib/user/migrations/0001_initial.py,sha256=JWfM9PcMDfkJUdCjLWuWieGs6643qP0KdbCyr5uAZoY,2950
|
@@ -235,7 +236,7 @@ accrete/contrib/user/templates/user/accrete_navbar_end_dropdown.html,sha256=suPo
|
|
235
236
|
accrete/contrib/user/templates/user/change_email.html,sha256=w9gBnU_O45YchY0EqD9mUK5oeDaD4cN92tHN80QjReA,815
|
236
237
|
accrete/contrib/user/templates/user/change_password.html,sha256=1U7cI-xshsy_nhSj3TUqL3tPtYaBF17XFDgJHXXDzIw,1021
|
237
238
|
accrete/contrib/user/templates/user/login.html,sha256=SXbxgq3baEch3ksGMsZqIws5heqAtpkdCLAFX3SLhtQ,2669
|
238
|
-
accrete/contrib/user/templates/user/user_form.html,sha256=
|
239
|
+
accrete/contrib/user/templates/user/user_form.html,sha256=fPbbUnx2URhdW9-by26q3xe3_w23de42Nj25BOC3qrs,2641
|
239
240
|
accrete/contrib/user_registration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
240
241
|
accrete/contrib/user_registration/admin.py,sha256=kwmGTsg4Hii-lsw9-UaJG7AhQ4k4SPi48GSrtpZ4YR4,119
|
241
242
|
accrete/contrib/user_registration/apps.py,sha256=mYu3fuuubfjImeJHk4D_Wd6Edw2r3oUNXGcFbAkhir4,181
|
@@ -261,7 +262,7 @@ accrete/utils/forms.py,sha256=1UQoG0cXel4Tg-a_cG9doJNrl62a0JMDVEYrT5TSX1s,3383
|
|
261
262
|
accrete/utils/log.py,sha256=BH0MBDweAjx30wGBO4F3sFhbgkSoEs7T1lLLjlYZNnA,407
|
262
263
|
accrete/utils/models.py,sha256=2xTacvcpmDK_Bp4rAK7JdVLf8HU009LYNJ6eSpMgYZI,1014
|
263
264
|
accrete/utils/views.py,sha256=AutijWetWGgjdO1PNc4gxCblT-i1fAfldNDFRbO9Sac,5012
|
264
|
-
accrete-0.0.
|
265
|
-
accrete-0.0.
|
266
|
-
accrete-0.0.
|
267
|
-
accrete-0.0.
|
265
|
+
accrete-0.0.131.dist-info/METADATA,sha256=U50p60IxKECtHAk-yUBYg9KBgs9gAMpCXD-sTt-euV8,4953
|
266
|
+
accrete-0.0.131.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
267
|
+
accrete-0.0.131.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
|
268
|
+
accrete-0.0.131.dist-info/RECORD,,
|
File without changes
|
File without changes
|