accrete 0.0.144__py3-none-any.whl → 0.0.145__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 +0 -187
- accrete/contrib/ui/templates/ui/detail.html +1 -1
- {accrete-0.0.144.dist-info → accrete-0.0.145.dist-info}/METADATA +1 -1
- {accrete-0.0.144.dist-info → accrete-0.0.145.dist-info}/RECORD +6 -6
- {accrete-0.0.144.dist-info → accrete-0.0.145.dist-info}/WHEEL +0 -0
- {accrete-0.0.144.dist-info → accrete-0.0.145.dist-info}/licenses/LICENSE +0 -0
accrete/contrib/ui/response.py
CHANGED
@@ -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',
|
@@ -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=EV1d4eNZNcUB0xn9FJvDWy2T2aNv1e21UFr73cS9f8Y,10408
|
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,7 +197,7 @@ 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
|
@@ -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.145.dist-info/METADATA,sha256=idt4aJsAK8BOUx3WvU8r2K5qCQlSPhuu9H5velgS74I,4953
|
280
|
+
accrete-0.0.145.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
281
|
+
accrete-0.0.145.dist-info/licenses/LICENSE,sha256=vHwb4Qnv8UfYKFiCWyTuRGsi49x19UQwHRCky3b2_NE,1057
|
282
|
+
accrete-0.0.145.dist-info/RECORD,,
|
File without changes
|
File without changes
|