accrete 0.0.144__py3-none-any.whl → 0.0.146__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/response.py +2 -189
- accrete/contrib/ui/templates/ui/detail.html +1 -1
- accrete/contrib/ui/templates/ui/list_update.html +1 -1
- accrete/contrib/user/templates/user/change_email.html +3 -10
- accrete/contrib/user/templates/user/change_password.html +5 -16
- {accrete-0.0.144.dist-info → accrete-0.0.146.dist-info}/METADATA +1 -1
- {accrete-0.0.144.dist-info → accrete-0.0.146.dist-info}/RECORD +9 -9
- {accrete-0.0.144.dist-info → accrete-0.0.146.dist-info}/WHEEL +0 -0
- {accrete-0.0.144.dist-info → accrete-0.0.146.dist-info}/licenses/LICENSE +0 -0
accrete/contrib/ui/response.py
CHANGED
@@ -141,8 +141,8 @@ class ListEntryResponse(Response):
|
|
141
141
|
instance: Model,
|
142
142
|
list_entry_template: str,
|
143
143
|
context: dict = None,
|
144
|
-
page: paginator.Page,
|
145
|
-
is_new: bool,
|
144
|
+
page: paginator.Page = None,
|
145
|
+
is_new: bool = False,
|
146
146
|
column_count: int = 1,
|
147
147
|
column_height: str = '150px',
|
148
148
|
):
|
@@ -309,193 +309,6 @@ class TriggerResponse:
|
|
309
309
|
return res
|
310
310
|
|
311
311
|
|
312
|
-
# @dataclass(kw_only=True)
|
313
|
-
# class Response:
|
314
|
-
#
|
315
|
-
# template: str
|
316
|
-
# context: dict = field(default_factory=dict)
|
317
|
-
#
|
318
|
-
# base_template = None
|
319
|
-
#
|
320
|
-
# def __post_init__(self):
|
321
|
-
# for key, value in self.context.items():
|
322
|
-
# setattr(self, key, value)
|
323
|
-
# if self.base_template is None:
|
324
|
-
# self.base_template = self.template
|
325
|
-
#
|
326
|
-
# def dict(self):
|
327
|
-
# return {
|
328
|
-
# attr: getattr(self, attr, None) for attr
|
329
|
-
# in filter(lambda x: not x.startswith('_'), self.__dict__)
|
330
|
-
# }
|
331
|
-
#
|
332
|
-
# @staticmethod
|
333
|
-
# def add_trigger(response):
|
334
|
-
# pass
|
335
|
-
#
|
336
|
-
# def render(self, request) -> str:
|
337
|
-
# return render_to_string(
|
338
|
-
# template_name=self.base_template, context=self.dict(), request=request
|
339
|
-
# )
|
340
|
-
#
|
341
|
-
# def response(self, request, extra_content: str = None) -> HttpResponse:
|
342
|
-
# extra_content = extra_content or ''
|
343
|
-
# res = HttpResponse(content=(
|
344
|
-
# self.render(request)
|
345
|
-
# + render_to_string('ui/message.html', self.dict(), request)
|
346
|
-
# + extra_content
|
347
|
-
# ))
|
348
|
-
# self.add_trigger(res)
|
349
|
-
# return res
|
350
|
-
#
|
351
|
-
#
|
352
|
-
# @dataclass(kw_only=True)
|
353
|
-
# class OobResponse(Response):
|
354
|
-
#
|
355
|
-
# swap: str
|
356
|
-
# tag: str = 'div'
|
357
|
-
# id: str = None
|
358
|
-
#
|
359
|
-
# base_template = 'ui/oob.html'
|
360
|
-
#
|
361
|
-
# def dict(self) -> dict:
|
362
|
-
# attributes = filter(
|
363
|
-
# lambda x: not x.startswith('_') and x not in ['template', 'swap', 'tag'],
|
364
|
-
# self.__dict__
|
365
|
-
# )
|
366
|
-
# res = {attr: getattr(self, attr, None) for attr in attributes}
|
367
|
-
# res.update({'oob': {
|
368
|
-
# 'template': self.template,
|
369
|
-
# 'id': self.id,
|
370
|
-
# 'swap': self.swap,
|
371
|
-
# 'tag': self.tag
|
372
|
-
# }})
|
373
|
-
# return res
|
374
|
-
#
|
375
|
-
# # def render(self, request) -> str:
|
376
|
-
# # return render_to_string(
|
377
|
-
# # template_name='ui/oob.html', context=self.dict(), request=request
|
378
|
-
# # )
|
379
|
-
#
|
380
|
-
#
|
381
|
-
# @dataclass(kw_only=True)
|
382
|
-
# class WindowResponse(Response):
|
383
|
-
#
|
384
|
-
# title: str = ''
|
385
|
-
# panel_template: str = None
|
386
|
-
# overview_header_template: str = None
|
387
|
-
# overview_data_template: str = None
|
388
|
-
#
|
389
|
-
# base_template = 'ui/layout.html'
|
390
|
-
#
|
391
|
-
# def __post_init__(self):
|
392
|
-
# if 'has_panel' not in self.context.keys():
|
393
|
-
# self.context.update(has_panel=self._has_panel())
|
394
|
-
# super().__post_init__()
|
395
|
-
# if self.template:
|
396
|
-
# self.base_template = self.template
|
397
|
-
#
|
398
|
-
# def _has_panel(self) -> bool:
|
399
|
-
# return bool(self.panel_template)
|
400
|
-
#
|
401
|
-
#
|
402
|
-
# @dataclass(kw_only=True)
|
403
|
-
# class PageResponse(WindowResponse):
|
404
|
-
#
|
405
|
-
# page: paginator.Page = None
|
406
|
-
# ui_filter: Filter = None
|
407
|
-
# endless_scroll: bool = True
|
408
|
-
#
|
409
|
-
# def __post_init__(self):
|
410
|
-
# assert self.page is not None or self.ui_filter is not None, _(
|
411
|
-
# 'Argument page or ui_filter must be supplied'
|
412
|
-
# )
|
413
|
-
# if self.ui_filter and not self.page:
|
414
|
-
# self.page = self.ui_filter.get_page()
|
415
|
-
# super().__post_init__()
|
416
|
-
#
|
417
|
-
# def _has_panel(self) -> bool:
|
418
|
-
# return bool(self.panel_template or self.ui_filter)
|
419
|
-
#
|
420
|
-
#
|
421
|
-
# @dataclass(kw_only=True)
|
422
|
-
# class ListResponse(PageResponse):
|
423
|
-
#
|
424
|
-
# list_entry_template: str = None
|
425
|
-
# column_count: int = 1
|
426
|
-
# column_height: str = '150px'
|
427
|
-
# overview_data_template:str = 'ui/list.html'
|
428
|
-
#
|
429
|
-
#
|
430
|
-
# @dataclass(kw_only=True)
|
431
|
-
# class ListEntryResponse(Response):
|
432
|
-
#
|
433
|
-
# object: Model
|
434
|
-
# list_entry_template: str
|
435
|
-
# page: paginator.Page = None
|
436
|
-
# new_entry: bool = False
|
437
|
-
# template: str = 'ui/list_update.html'
|
438
|
-
#
|
439
|
-
# def render(self, request) -> str:
|
440
|
-
# res = super().render(request)
|
441
|
-
# if self.page:
|
442
|
-
# pagination_update = OobResponse(
|
443
|
-
# template='ui/layout.html#pagination',
|
444
|
-
# swap='innerHTML:#pagination',
|
445
|
-
# context=dict(page=self.page)
|
446
|
-
# ).render(request)
|
447
|
-
# res += pagination_update
|
448
|
-
# return res
|
449
|
-
#
|
450
|
-
#
|
451
|
-
# @dataclass(kw_only=True)
|
452
|
-
# class TableResponse(PageResponse):
|
453
|
-
#
|
454
|
-
# object_label: str
|
455
|
-
# fields: list[str]
|
456
|
-
# footer: dict = field(default_factory=dict)
|
457
|
-
# template = 'ui/table.html'
|
458
|
-
#
|
459
|
-
#
|
460
|
-
# @dataclass(kw_only=True)
|
461
|
-
# class TableRowResponse(Response):
|
462
|
-
#
|
463
|
-
# object: Model
|
464
|
-
# fields: list[str]
|
465
|
-
# footer: dict = field(default_factory=dict)
|
466
|
-
# page: paginator.Page = None
|
467
|
-
#
|
468
|
-
# base_template = 'ui/table_row_update.html'
|
469
|
-
#
|
470
|
-
#
|
471
|
-
# @dataclass(kw_only=True)
|
472
|
-
# class DetailResponse(Response):
|
473
|
-
#
|
474
|
-
# detail_data_template: str = None
|
475
|
-
# detail_header_template: str = None
|
476
|
-
#
|
477
|
-
# base_template = 'ui/detail.html'
|
478
|
-
#
|
479
|
-
# @staticmethod
|
480
|
-
# def add_trigger(response):
|
481
|
-
# add_trigger(response, 'activate-detail')
|
482
|
-
#
|
483
|
-
#
|
484
|
-
# @dataclass(kw_only=True)
|
485
|
-
# class ModalResponse(Response):
|
486
|
-
#
|
487
|
-
# title: str
|
488
|
-
# modal_id: str
|
489
|
-
# template: str
|
490
|
-
# modal_update: bool = False
|
491
|
-
# blocking: bool = False
|
492
|
-
# modal_width: str = None
|
493
|
-
#
|
494
|
-
# def __post_init__(self):
|
495
|
-
# super().__post_init__()
|
496
|
-
# self.modal_id = re.sub(r'[^A-Za-z-]+', '', self.modal_id).strip('-')
|
497
|
-
|
498
|
-
|
499
312
|
def search_select_response(queryset) -> HttpResponse:
|
500
313
|
return HttpResponse(render_to_string(
|
501
314
|
'ui/widgets/model_search_select_options.html',
|
@@ -1,19 +1,12 @@
|
|
1
1
|
{% extends 'ui/modal.html' %}
|
2
2
|
{% load i18n %}
|
3
|
+
{% load ui %}
|
3
4
|
|
4
5
|
{% block modal_content %}
|
5
6
|
<form id="{{ modal_id }}-form" hx-post="{% url 'user:change_email' %}">
|
6
7
|
{% csrf_token %}
|
7
|
-
|
8
|
-
|
9
|
-
{{ form.email }}
|
10
|
-
<span class="has-text-danger is-size-7">{{ form.email.errors }}</span>
|
11
|
-
</label>
|
12
|
-
<label class="label has-field is-required">
|
13
|
-
{{ form.password.label }}
|
14
|
-
{{ form.password }}
|
15
|
-
<span class="has-text-danger is-size-7">{{ form.password.errors }}</span>
|
16
|
-
</label>
|
8
|
+
{{ form.email|wrap_label }}
|
9
|
+
{{ form.password|wrap_label }}
|
17
10
|
</form>
|
18
11
|
{% endblock %}
|
19
12
|
|
@@ -1,24 +1,13 @@
|
|
1
1
|
{% extends 'ui/modal.html' %}
|
2
2
|
{% load i18n %}
|
3
|
+
{% load ui %}
|
3
4
|
|
4
5
|
{% block modal_content %}
|
5
6
|
<form id="{{ modal_id }}-form" hx-post="{% url 'user:change_password' %}">
|
6
|
-
|
7
|
-
|
8
|
-
{{ form.
|
9
|
-
{{ form.
|
10
|
-
<span class="has-text-danger is-size-7">{{ form.old_password.errors }}</span>
|
11
|
-
</label>
|
12
|
-
<label class="label has-field is-required">
|
13
|
-
{{ form.new_password.label }}
|
14
|
-
{{ form.new_password }}
|
15
|
-
<span class="has-text-danger is-size-7">{{ form.new_password.errors }}</span>
|
16
|
-
</label>
|
17
|
-
<label class="label has-field is-required">
|
18
|
-
{{ form.new_password_confirm.label }}
|
19
|
-
{{ form.new_password_confirm }}
|
20
|
-
<span class="has-text-danger is-size-7">{{ form.new_password_confirm.errors }}</span>
|
21
|
-
</label>
|
7
|
+
{% csrf_token %}
|
8
|
+
{{ form.old_password|wrap_label }}
|
9
|
+
{{ form.new_password|wrap_label }}
|
10
|
+
{{ form.new_password_confirm|wrap_label }}
|
22
11
|
</form>
|
23
12
|
{% endblock %}
|
24
13
|
|
@@ -66,7 +66,7 @@ accrete/contrib/ui/apps.py,sha256=E0ao2ox6PQ3ldfeR17FXJUUJuGiWjm2DPCxHbPXGzls,15
|
|
66
66
|
accrete/contrib/ui/filter.py,sha256=WWELsSZF-v7FxAWw1gGvYHFBB0BhmQWuWacI_joTKas,13703
|
67
67
|
accrete/contrib/ui/middleware.py,sha256=QprWR8FXK9iMPIvLQAeYASaUJSW0uD9BHoYroMKrph0,1560
|
68
68
|
accrete/contrib/ui/models.py,sha256=Vjc0p2XbAPgE6HyTF6vll98A4eDhA5AvaQqsc4kQ9AQ,57
|
69
|
-
accrete/contrib/ui/response.py,sha256=
|
69
|
+
accrete/contrib/ui/response.py,sha256=QwCxuPrzPLcJHOnZHfy0GcqqRWzZIu5kiInFxLE6VYg,10423
|
70
70
|
accrete/contrib/ui/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
71
71
|
accrete/contrib/ui/urls.py,sha256=5XUfK85HYWYf7oopMoJEEYmQ6pNgHgZBErBEn97pBt4,337
|
72
72
|
accrete/contrib/ui/views.py,sha256=5VUbP0jgMcLMv9-3AKxkV315RA0qXuw5PmTRejPc0Yg,1136
|
@@ -197,12 +197,12 @@ accrete/contrib/ui/templates/django/forms/widgets/text.html,sha256=MSmLlQc7PsPoD
|
|
197
197
|
accrete/contrib/ui/templates/django/forms/widgets/textarea.html,sha256=c9BTedqb3IkXLyVYd0p9pR8DFnsXCNGoxVBWZTk_Fic,278
|
198
198
|
accrete/contrib/ui/templates/ui/content.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
199
199
|
accrete/contrib/ui/templates/ui/content_right.html,sha256=aOFjbtXjjlqwmHpGoEpAUz6LtLGSTM6mX_RAO5-aM6k,380
|
200
|
-
accrete/contrib/ui/templates/ui/detail.html,sha256=
|
200
|
+
accrete/contrib/ui/templates/ui/detail.html,sha256=V0HccLE0Pb-5haQFpvIoWZfF1UOrvMwPYv2UTwRnt_A,293
|
201
201
|
accrete/contrib/ui/templates/ui/favicon.html,sha256=ZSK6qDGV4Cexgt0VA3KOHYN100yZHOFjfOiFZVudWg0,90
|
202
202
|
accrete/contrib/ui/templates/ui/form_error.html,sha256=WWqfFWyJ_LCzm5IkxXztn23GFak5wyM2HZcmiZ3Eq9s,417
|
203
203
|
accrete/contrib/ui/templates/ui/layout.html,sha256=r3ZylKY2iPK8HwNcRPSzuJ4dfEQKQMGFCu7CBBE9gUg,13674
|
204
204
|
accrete/contrib/ui/templates/ui/list.html,sha256=xyEUYwQKcj-65CO5Te8ixQcUoUj_bh4nmN9cpHaO9uM,2437
|
205
|
-
accrete/contrib/ui/templates/ui/list_update.html,sha256=
|
205
|
+
accrete/contrib/ui/templates/ui/list_update.html,sha256=CUV-OJCieOBrtSbh0vAoyZYL-_e9lP7vQrY4j1TlT7M,276
|
206
206
|
accrete/contrib/ui/templates/ui/message.html,sha256=dQnPNkHIrrOzelXCTO8CLWG5ufmxJ8MuWp66YLZbmro,773
|
207
207
|
accrete/contrib/ui/templates/ui/modal.html,sha256=3FzvnFVWvwRQ_r1-2qd9N5wYIOh6_oYDDp7uk6XoJPE,3481
|
208
208
|
accrete/contrib/ui/templates/ui/oob.html,sha256=lZHIBBYclefbGkKguS1A7vrtOhODJizbSRaGAAHDvG8,267
|
@@ -243,8 +243,8 @@ accrete/contrib/user/migrations/0007_user_managed_login.py,sha256=SfG1Yj9m_g-sZb
|
|
243
243
|
accrete/contrib/user/migrations/0008_remove_user_no_email_for_managed_user_and_more.py,sha256=XypG6tN0WmLyJV8sbZgSVqNFbTxRsBHWhIRyMJGfV7c,655
|
244
244
|
accrete/contrib/user/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
245
245
|
accrete/contrib/user/templates/user/accrete_navbar_end_dropdown.html,sha256=suPoeu1Dm49rDCrhnrkSZY8cBDsovnKqKGXcS5q-7o0,334
|
246
|
-
accrete/contrib/user/templates/user/change_email.html,sha256=
|
247
|
-
accrete/contrib/user/templates/user/change_password.html,sha256=
|
246
|
+
accrete/contrib/user/templates/user/change_email.html,sha256=C53Ow_J80nycjbfrUrvETdd2-J4ZJnbHAjGKk1N2zUo,463
|
247
|
+
accrete/contrib/user/templates/user/change_password.html,sha256=pOc4C0J-rY7Nr0ltMGT-DpKdsVBOvEWqj1UBa_kTYVw,523
|
248
248
|
accrete/contrib/user/templates/user/login.html,sha256=SXbxgq3baEch3ksGMsZqIws5heqAtpkdCLAFX3SLhtQ,2669
|
249
249
|
accrete/contrib/user/templates/user/password_forgotten.html,sha256=aoNR9VUhLkDFLIQ3NUA2Oh19bFlro0ZXvcRUdGDNPnc,30
|
250
250
|
accrete/contrib/user/templates/user/user_preferences.html,sha256=s-WmVASO0-5R2PY-y_ExS5kl9yOtMQpElVH3nKLqW0g,1646
|
@@ -276,7 +276,7 @@ accrete/utils/forms.py,sha256=naV4urdfvmpxcx5Vf3Fo72M5Fy8DjGg5-vkysMKptbA,3914
|
|
276
276
|
accrete/utils/log.py,sha256=BH0MBDweAjx30wGBO4F3sFhbgkSoEs7T1lLLjlYZNnA,407
|
277
277
|
accrete/utils/models.py,sha256=2xTacvcpmDK_Bp4rAK7JdVLf8HU009LYNJ6eSpMgYZI,1014
|
278
278
|
accrete/utils/views.py,sha256=mHfcKNDOiq-38LQ6tz9pDPQt-xs03b2qMxwJClprqu8,5022
|
279
|
-
accrete-0.0.
|
280
|
-
accrete-0.0.
|
281
|
-
accrete-0.0.
|
282
|
-
accrete-0.0.
|
279
|
+
accrete-0.0.146.dist-info/METADATA,sha256=fFoFLZA3KrYwNZnCox5GJUegFEFKcrqpVg8BpMSbOzg,4953
|
280
|
+
accrete-0.0.146.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
281
|
+
accrete-0.0.146.dist-info/licenses/LICENSE,sha256=vHwb4Qnv8UfYKFiCWyTuRGsi49x19UQwHRCky3b2_NE,1057
|
282
|
+
accrete-0.0.146.dist-info/RECORD,,
|
File without changes
|
File without changes
|