accrete 0.0.148__py3-none-any.whl → 0.0.150__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.
@@ -135,7 +135,6 @@ class ListResponse(WindowResponse):
135
135
  )
136
136
  self.page = page or (ui_filter and ui_filter.get_page())
137
137
  self.list_entry_template = list_entry_template
138
- self.page = page
139
138
  self.ui_filter = ui_filter
140
139
  self.endless_scroll = endless_scroll
141
140
  self.column_count = column_count
@@ -425,7 +424,7 @@ def add_trigger(
425
424
  return response
426
425
 
427
426
 
428
- def update(request, ui_responses: list[Response]) -> HttpResponse:
427
+ def update(request, ui_responses: list[Response], trigger: list[ClientTrigger] = None) -> HttpResponse:
429
428
  response = HttpResponse()
430
429
  content = ''
431
430
  for res in ui_responses:
@@ -433,4 +432,6 @@ def update(request, ui_responses: list[Response]) -> HttpResponse:
433
432
  res.add_trigger(response)
434
433
  content += render_to_string('ui/message.html', request=request)
435
434
  response.content = content
435
+ for t in trigger or []:
436
+ add_trigger(response, t.trigger, t.header)
436
437
  return response
@@ -0,0 +1,10 @@
1
+ {% load ui %}
2
+
3
+ <div class="field has-addons mb-0">
4
+ <p class="control">
5
+ <p class="control"><a class="button is-subtle" style="height: 100%; border-top-left-radius: var(--bulma-radius-medium); border-bottom-left-radius: var(--bulma-radius-medium);">{{ widget.value|weekday:'' }}</a></p>
6
+ </p>
7
+ <p class="control is-expanded">
8
+ <input class="{% if widget.type != 'checkbox' %}input{% endif %} is-fullwidth" name="{{ widget.name }}" type="{{ widget.type }}"{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %} {% include "django/forms/widgets/attrs.html" %}>
9
+ </p>
10
+ </div>
@@ -130,9 +130,11 @@ def timedelta_cast(td: timedelta, code: str) -> str | None:
130
130
 
131
131
 
132
132
  @register.filter(name='weekday')
133
- def datetime_to_weekday(dt: datetime|date, default=None) -> str:
133
+ def datetime_to_weekday(dt: datetime|date|str, default=None) -> str:
134
134
  if dt is None:
135
135
  return default
136
+ if isinstance(dt, str):
137
+ dt = datetime.strptime(dt, '%Y-%m-%d')
136
138
  mapping = {
137
139
  1: _('Mon'),
138
140
  2: _('Tue'),
@@ -1 +1,2 @@
1
1
  from .search_select import ModelSearchSelect, ModelSearchSelectMulti
2
+ from. date_weekday import DateWeekday
@@ -0,0 +1,6 @@
1
+ from django.forms import widgets
2
+
3
+
4
+ class DateWeekday(widgets.DateInput):
5
+ template_name = 'ui/widgets/date_weekday.html'
6
+ input_type = 'date'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: accrete
3
- Version: 0.0.148
3
+ Version: 0.0.150
4
4
  Summary: Django Shared Schema Multi Tenant
5
5
  Author-email: Benedikt Jilek <benedikt.jilek@pm.me>
6
6
  License: Copyright (c) 2025 Benedikt Jilek
@@ -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=dXc0G6HDg0CfQieumqQmaloYwLzd72LiMgRiNEKlG0g,13419
69
+ accrete/contrib/ui/response.py,sha256=NiV8SElw3AIrx0qyFzR-Ad9Q1o383rcsUCMM4fqz-Gw,13510
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
@@ -214,12 +214,14 @@ accrete/contrib/ui/templates/ui/filter/query_operator.html,sha256=h4WWLDnse6DK5R
214
214
  accrete/contrib/ui/templates/ui/filter/query_params.html,sha256=wCkyZ9oSK_ivraNiL-UAY_9TflYw5EspnHHm6V6uOzk,9548
215
215
  accrete/contrib/ui/templates/ui/filter/query_tags.html,sha256=ooeIwIwvhT0fG5SMAuLoMquTVUmYf5n50DM-3gC_iAo,1567
216
216
  accrete/contrib/ui/templates/ui/templatetags/field.html,sha256=G029l141G0VICuEgPxr6jfr3eBV4MuE-yt6iQLVrrlg,1168
217
+ accrete/contrib/ui/templates/ui/widgets/date_weekday.html,sha256=BDrfeEdmVxXbEEyMHD4Ys3wGYs3sVSm4pjE6HMhTb8I,628
217
218
  accrete/contrib/ui/templates/ui/widgets/model_search_select.html,sha256=AUlWN2gKhHk_tWP1-KGel5ifaRMTF60MUtgbap7CGQ4,2938
218
219
  accrete/contrib/ui/templates/ui/widgets/model_search_select_multi.html,sha256=0YtxEmKqagUAIjkP0a36G2T4z0ySi8He4qmMu9EmMVw,4682
219
220
  accrete/contrib/ui/templates/ui/widgets/model_search_select_options.html,sha256=4Wky0XkYWZlIKXTXzGjJkJTX3H9rhjXTY1hYai3Q3TA,242
220
221
  accrete/contrib/ui/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
221
- accrete/contrib/ui/templatetags/ui.py,sha256=YRiIdTat-CCKjYP5FG3o-JaHpO4RffqUn6V14B4emeI,5124
222
- accrete/contrib/ui/widgets/__init__.py,sha256=W_y10jfu37lygp4frXuKFSGec97gpNbWskG6DMhTKtY,69
222
+ accrete/contrib/ui/templatetags/ui.py,sha256=WmIKx1Y42VUAzq9bcRhcqmLvRTWP82Z6d8YTJKW0mQ4,5203
223
+ accrete/contrib/ui/widgets/__init__.py,sha256=2mcvXyFNdFkqOVHGUBDbLmbaJnWnoFaS1uc4dqmdtpE,106
224
+ accrete/contrib/ui/widgets/date_weekday.py,sha256=r6VNE8dwGVZq4jJLGF_MP320-yp482Iykh-WsjeY9XU,148
223
225
  accrete/contrib/ui/widgets/search_select.py,sha256=zKmOt54QsxUobNkDNEA2ut3pPAl8a5DqmEpcfam1l1I,3762
224
226
  accrete/contrib/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
227
  accrete/contrib/user/admin.py,sha256=0SGhVB5RcIsbCvrLf9ZSgIFH68XmGlPzovisMP8bb6c,710
@@ -276,7 +278,7 @@ accrete/utils/forms.py,sha256=naV4urdfvmpxcx5Vf3Fo72M5Fy8DjGg5-vkysMKptbA,3914
276
278
  accrete/utils/log.py,sha256=BH0MBDweAjx30wGBO4F3sFhbgkSoEs7T1lLLjlYZNnA,407
277
279
  accrete/utils/models.py,sha256=2xTacvcpmDK_Bp4rAK7JdVLf8HU009LYNJ6eSpMgYZI,1014
278
280
  accrete/utils/views.py,sha256=mHfcKNDOiq-38LQ6tz9pDPQt-xs03b2qMxwJClprqu8,5022
279
- accrete-0.0.148.dist-info/METADATA,sha256=SLPaFIGp5oZTsazu0XIeEoAs1jzlZ4PJFz4-rVJT75s,4953
280
- accrete-0.0.148.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
281
- accrete-0.0.148.dist-info/licenses/LICENSE,sha256=vHwb4Qnv8UfYKFiCWyTuRGsi49x19UQwHRCky3b2_NE,1057
282
- accrete-0.0.148.dist-info/RECORD,,
281
+ accrete-0.0.150.dist-info/METADATA,sha256=WKssPt26NVrAGPvHIBr8lIJG3RK5qVuZMO-XUepEgmI,4953
282
+ accrete-0.0.150.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
283
+ accrete-0.0.150.dist-info/licenses/LICENSE,sha256=vHwb4Qnv8UfYKFiCWyTuRGsi49x19UQwHRCky3b2_NE,1057
284
+ accrete-0.0.150.dist-info/RECORD,,