fastlifeweb 0.7.3__py3-none-any.whl → 0.8.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.
- fastlife/__init__.py +3 -0
- fastlife/monkeypatch.py +8 -0
- fastlife/templates/CsrfToken.jinja +1 -1
- fastlife/templates/Radio.jinja +1 -1
- fastlife/templates/pydantic_form/Boolean.jinja +4 -4
- fastlife/templates/pydantic_form/Checklist.jinja +5 -5
- fastlife/templates/pydantic_form/Dropdown.jinja +6 -6
- fastlife/templates/pydantic_form/Hidden.jinja +1 -1
- fastlife/templates/pydantic_form/Model.jinja +2 -2
- fastlife/templates/pydantic_form/Sequence.jinja +3 -3
- fastlife/templates/pydantic_form/Text.jinja +6 -6
- fastlife/templates/pydantic_form/Union.jinja +6 -6
- fastlife/templates/pydantic_form/Widget.jinja +1 -1
- {fastlifeweb-0.7.3.dist-info → fastlifeweb-0.8.0.dist-info}/METADATA +2 -2
- {fastlifeweb-0.7.3.dist-info → fastlifeweb-0.8.0.dist-info}/RECORD +17 -16
- {fastlifeweb-0.7.3.dist-info → fastlifeweb-0.8.0.dist-info}/LICENSE +0 -0
- {fastlifeweb-0.7.3.dist-info → fastlifeweb-0.8.0.dist-info}/WHEEL +0 -0
fastlife/__init__.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
from .configurator import Configurator, configure
|
2
2
|
from .configurator.registry import Registry
|
3
3
|
|
4
|
+
from .monkeypatch import monkeypatch
|
4
5
|
# from .request.form_data import model
|
5
6
|
from .templating import Template, template
|
6
7
|
|
8
|
+
monkeypatch()
|
9
|
+
|
7
10
|
__all__ = [
|
8
11
|
# Config
|
9
12
|
"configure",
|
fastlife/monkeypatch.py
ADDED
@@ -1 +1 @@
|
|
1
|
-
<Hidden name=
|
1
|
+
<Hidden :name="csrf_token.name" :value="csrf_token.value" />
|
fastlife/templates/Radio.jinja
CHANGED
@@ -26,5 +26,5 @@ div_class="flex items-center mb-4"
|
|
26
26
|
<input type="radio" name="{{name}}" id="{{id}}" value="{{value}}" {% if checked %}checked{% endif %}
|
27
27
|
class="{{attrs.class or class_}}" {% if onclick %}onclick="{{onclick}}" {% endif %} {%if
|
28
28
|
disabled%}disabled{%endif%}>
|
29
|
-
<Label for=
|
29
|
+
<Label :for="id" :class="label_class">{{label}}</Label>
|
30
30
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
{# def widget #}
|
2
|
-
<pydantic_form.Widget widget=
|
2
|
+
<pydantic_form.Widget :widget="widget" :removable="widget.removable">
|
3
3
|
<div class="pt-4">
|
4
4
|
<div class="flex items-center">
|
5
|
-
|
6
|
-
|
5
|
+
<Checkbox :name="widget.name" type="checkbox" :id="widget.id" :checked="widget.value" value="1" />
|
6
|
+
<Label :for="widget.id" class="ms-2 text-base text-neutral-900 dark:text-white">
|
7
7
|
{{widget.title|safe}}
|
8
8
|
</Label>
|
9
9
|
</div>
|
10
|
-
|
10
|
+
<pydantic_form.Error :text="widget.error" />
|
11
11
|
</div>
|
12
12
|
</pydantic_form.Widget>
|
@@ -2,19 +2,19 @@
|
|
2
2
|
widget,
|
3
3
|
#}
|
4
4
|
|
5
|
-
<pydantic_form.Widget widget=
|
5
|
+
<pydantic_form.Widget :widget="widget" :removable="widget.removable">
|
6
6
|
<div class="pt-4">
|
7
7
|
<details open>
|
8
8
|
<summary class="justify-between items-center font-medium cursor-pointer">
|
9
9
|
<H3>{{widget.title}}</H3>
|
10
|
-
<pydantic_form.Error text=
|
10
|
+
<pydantic_form.Error :text="widget.error" />
|
11
11
|
</summary>
|
12
12
|
<div>
|
13
13
|
{% for value in widget.value %}
|
14
14
|
<div class="flex items-center mb-4">
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
<Checkbox :name="value.field_name" type="checkbox" :id="value.id" :value="value.value" :checked="value.checked" />
|
16
|
+
<Label :for="value.id" class="ms-2 text-base text-neutral-900 dark:text-white">{{value.label}}</Label>
|
17
|
+
<pydantic_form.Error :text="value.error" />
|
18
18
|
</div>
|
19
19
|
{% endfor %}
|
20
20
|
</div>
|
@@ -1,16 +1,16 @@
|
|
1
1
|
{# def widget #}
|
2
2
|
|
3
|
-
<pydantic_form.Widget widget=
|
3
|
+
<pydantic_form.Widget :widget="widget" :removable="widget.removable">
|
4
4
|
<div class="pt-4">
|
5
|
-
|
6
|
-
|
5
|
+
<Label :for="widget.id">{{widget.title}}</Label>
|
6
|
+
<Select :name="widget.name" :id="widget.id">
|
7
7
|
{%- for opt in widget.options -%}
|
8
|
-
|
8
|
+
<Option :value="opt.value" id={{widget.id + "-" + opt.value}} :selected="widget.value==opt.value">
|
9
9
|
{{ opt.text }}
|
10
10
|
</Option>
|
11
11
|
{%- endfor -%}
|
12
12
|
</Select>
|
13
|
-
|
14
|
-
|
13
|
+
<pydantic_form.Error :text="widget.error" />
|
14
|
+
<pydantic_form.Hint :text="widget.hint" />
|
15
15
|
</div>
|
16
16
|
</pydantic_form.Widget>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
{# def widget #}
|
2
|
-
<Hidden name=
|
2
|
+
<Hidden :name="widget.name" :value="widget.value" :id="widget.id" />
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{# def widget, children_widget #}
|
2
2
|
|
3
|
-
<pydantic_form.Widget widget=
|
3
|
+
<pydantic_form.Widget :widget="widget" :removable="widget.removable">
|
4
4
|
<div id="{{widget.id}}" class="m-4">
|
5
5
|
<details open>
|
6
6
|
<summary class="justify-between items-center font-medium cursor-pointer">
|
7
7
|
<H3>{{widget.title}}</H3>
|
8
|
-
<pydantic_form.Error text=
|
8
|
+
<pydantic_form.Error :text="widget.error" />
|
9
9
|
</summary>
|
10
10
|
<div>
|
11
11
|
{% for child in children_widget %}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
{# def widget, children_widgets, type #}
|
2
2
|
|
3
|
-
<pydantic_form.Widget widget=
|
3
|
+
<pydantic_form.Widget :widget="widget" :removable="widget.removable">
|
4
4
|
<details id="{{widget.id}}" open>
|
5
5
|
<summary class="justify-between items-center font-medium cursor-pointer">
|
6
6
|
<H3>{{widget.title}}</H3>
|
7
|
-
<pydantic_form.Error text=
|
7
|
+
<pydantic_form.Error :text="widget.error" />
|
8
8
|
</summary>
|
9
9
|
<div>
|
10
10
|
{% set fnGetName = "get" + widget.id.replace("-", "_") %}
|
@@ -29,7 +29,7 @@
|
|
29
29
|
{% set container_id = "#" + widget.id + "-container" %}
|
30
30
|
{% set add_id = widget.id + "-add" %}
|
31
31
|
{% set vals = 'js:{"name": '+ fnGetName + '(), "token": "' + type.token + '", "removable": true}' %}
|
32
|
-
<Button type="button" hx-target=
|
32
|
+
<Button type="button" :hx-target="container_id" hx-swap="beforeend" :id="add_id" :hx-vals="vals" :hx-get="type.url">
|
33
33
|
Add
|
34
34
|
</Button>
|
35
35
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{# def widget #}
|
2
2
|
|
3
|
-
<pydantic_form.Widget widget=
|
3
|
+
<pydantic_form.Widget :widget="widget" :removable="widget.removable">
|
4
4
|
<div class="pt-4">
|
5
|
-
<Label for=
|
6
|
-
<pydantic_form.Error text=
|
7
|
-
<Input name=
|
8
|
-
aria-label=
|
9
|
-
<pydantic_form.Hint text=
|
5
|
+
<Label :for="widget.id">{{widget.title}}</Label>
|
6
|
+
<pydantic_form.Error :text="widget.error" />
|
7
|
+
<Input :name="widget.name" :value="widget.value" :type="widget.input_type" :id="widget.id"
|
8
|
+
:aria-label="widget.aria_label" :placeholder="widget.placeholder" />
|
9
|
+
<pydantic_form.Hint :text="widget.hint" />
|
10
10
|
</div>
|
11
11
|
</pydantic_form.Widget>
|
@@ -1,24 +1,24 @@
|
|
1
1
|
{# def widget, child, types, parent_type #}
|
2
2
|
|
3
|
-
<pydantic_form.Widget widget=
|
3
|
+
<pydantic_form.Widget :widget="widget">
|
4
4
|
<div id="{{widget.id}}">
|
5
5
|
<details open>
|
6
6
|
<summary class="justify-between items-center font-medium cursor-pointer">
|
7
7
|
<H3>{{widget.title}}</H3>
|
8
|
-
<pydantic_form.Error text=
|
8
|
+
<pydantic_form.Error :text="widget.error" />
|
9
9
|
</summary>
|
10
10
|
<div hx-sync="this" id="{{widget.id}}-child">
|
11
11
|
{% if child %}
|
12
12
|
{{ child }}
|
13
13
|
{% else %}
|
14
14
|
{% for typ in types %}
|
15
|
-
<Button type="button" hx-target="closest div" hx-get=
|
16
|
-
|
15
|
+
<Button type="button" hx-target="closest div" :hx-get="typ.url" :hx-vals="typ.params|tojson" :id="typ.id"
|
16
|
+
onclick={{ "document.getElementById('" + widget.id + "-remove-btn').hidden=false" }}>{{typ.title}}</Button>
|
17
17
|
{% endfor %}
|
18
18
|
{% endif %}
|
19
19
|
</div>
|
20
|
-
<Button type="button" id=
|
21
|
-
|
20
|
+
<Button type="button" :id="widget.id + '-remove-btn'" :hx-target="'#' + widget.id"
|
21
|
+
hx-vals="parent_type.params|tojson" :hx-get="parent_type.url" :hidden="not child">
|
22
22
|
Remove
|
23
23
|
</Button>
|
24
24
|
</details>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div id="{{container_id}}">
|
4
4
|
{{ content }}
|
5
5
|
{% if removable %}
|
6
|
-
<Button type="button" onclick=
|
6
|
+
<Button type="button" :onclick="'document.getElementById(' + container_id + ').remove()'">
|
7
7
|
Remove
|
8
8
|
</Button>
|
9
9
|
{% endif %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastlifeweb
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: High-level web framework
|
5
5
|
Home-page: https://github.com/mardiros/fastlife
|
6
6
|
License: BSD-derived
|
@@ -21,7 +21,7 @@ Requires-Dist: beautifulsoup4[testing] (>=4.12.2,<5.0.0)
|
|
21
21
|
Requires-Dist: behave (>=1.2.6,<2.0.0)
|
22
22
|
Requires-Dist: fastapi (>=0.112.0,<0.113.0)
|
23
23
|
Requires-Dist: itsdangerous (>=2.1.2,<3.0.0)
|
24
|
-
Requires-Dist: jinjax (>=0.
|
24
|
+
Requires-Dist: jinjax (>=0.43,<0.44)
|
25
25
|
Requires-Dist: markupsafe (>=2.1.3,<3.0.0)
|
26
26
|
Requires-Dist: multidict (>=6.0.5,<7.0.0)
|
27
27
|
Requires-Dist: pydantic (>=2.5.3,<3.0.0)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fastlife/__init__.py,sha256=
|
1
|
+
fastlife/__init__.py,sha256=3hOgEGG7bA-cmYSsPrzPpY7lroc5hvLx7bWLBTodSMU,369
|
2
2
|
fastlife/configurator/__init__.py,sha256=vMV25HEfuXjCL7DhZukhlB2JSfxwzX2lGbErcZ5b7N0,146
|
3
3
|
fastlife/configurator/base.py,sha256=2ahvTudLmD99YQjnIeGN5JDPCSl3k-mauu7bsSEB5RE,216
|
4
4
|
fastlife/configurator/configurator.py,sha256=1RzDS-BEQ5MjNv29QKnmRO-j50xJ4Noax-I8tcClRyQ,7238
|
@@ -11,6 +11,7 @@ fastlife/middlewares/reverse_proxy/x_forwarded.py,sha256=K_WvXAP2Cdt-pFXYVPcAyh9
|
|
11
11
|
fastlife/middlewares/session/__init__.py,sha256=OnzRCYRzc1lw9JB0UdKi-aRLPNT2n8mM8kwY1P4w7uU,838
|
12
12
|
fastlife/middlewares/session/middleware.py,sha256=JgXdBlxlm9zIEgXcidbBrMAp5wJVPsZWtvCLVDk5h2s,3049
|
13
13
|
fastlife/middlewares/session/serializer.py,sha256=qpVnHQjYTxw3aOnoEOKIjOFJg2z45KjiX5sipWk2gws,1458
|
14
|
+
fastlife/monkeypatch.py,sha256=bAr5rpwR_1JZqzWZG3TQa2hrk1fHP_Uk5Jil5-hdIWE,230
|
14
15
|
fastlife/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
16
|
fastlife/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
17
|
fastlife/request/form_data.py,sha256=mP8ilwRUY2WbktIkRgaJJ2EUjwUMPbSPg29GzwZgT18,3713
|
@@ -26,7 +27,7 @@ fastlife/shared_utils/resolver.py,sha256=wXQQTB4jf86m4qENhMOkHkWpLJj_T4-_eND_ItT
|
|
26
27
|
fastlife/templates/A.jinja,sha256=q71nu4Rq874LG6SykCKv8W-EZeX13NMF0AsLc9FFAP0,677
|
27
28
|
fastlife/templates/Button.jinja,sha256=sHJtgOTJmL2Ttpy-SNKdq3BcoTe6NI0MSKG2N44Z-iI,1283
|
28
29
|
fastlife/templates/Checkbox.jinja,sha256=XdgtI7GTVjPkxTje9KMILzHqjMFRmTpubtKM8nL7K1o,447
|
29
|
-
fastlife/templates/CsrfToken.jinja,sha256=
|
30
|
+
fastlife/templates/CsrfToken.jinja,sha256=7qbPvgiAgR6fgaCnDTLozJgOPSWWUJ_W4VLPGra4ahA,61
|
30
31
|
fastlife/templates/Form.jinja,sha256=h8Y2yrlrTRuLnwqCTDv8eeFgaej2eQiXDvFOx5eEcGg,367
|
31
32
|
fastlife/templates/H1.jinja,sha256=fetjIhZvgw5gm6xJhl_-cnHvrPwuLYE4S1rVYgbqNl8,196
|
32
33
|
fastlife/templates/H2.jinja,sha256=z022lvv3PO_g-ZxWuAiKmBOaFZ3u8Kbzd0jkuWNsOS0,196
|
@@ -39,7 +40,7 @@ fastlife/templates/Input.jinja,sha256=YlImqjxjCJjjHAekYmUDUyHloNWEVlddeF0Ea7A_C6
|
|
39
40
|
fastlife/templates/Label.jinja,sha256=m71vGDUi2HzzA5d9L3TQhdEXYKHcp6LXP6PE0-bx44w,170
|
40
41
|
fastlife/templates/Option.jinja,sha256=YlgBayJj94kSXK0mlGkMxTmHjTBr8T-UzvQmTcANK0Q,121
|
41
42
|
fastlife/templates/P.jinja,sha256=xEcHIv9dJRpELu_SdqQcftvKrU8z1i_BHTEVO5Mu5dU,164
|
42
|
-
fastlife/templates/Radio.jinja,sha256=
|
43
|
+
fastlife/templates/Radio.jinja,sha256=rH9E4eCqgAP4ap-Mo7MINRG9b-UBdKW9lYcCb8HwSkE,725
|
43
44
|
fastlife/templates/Select.jinja,sha256=GoK2oh4Jl5dAfL2wN718RCwtHaQIslzDCN_nwy6a9oY,480
|
44
45
|
fastlife/templates/Table.jinja,sha256=Zhqmb-otlp05h3WDliFfK3HkxHrhDoKL0cbH7GgS2aY,132
|
45
46
|
fastlife/templates/Tbody.jinja,sha256=K8wwTYcYi8-NYdP4g7MBokvYqJp9QW7DmChADuCa-Gs,35
|
@@ -49,17 +50,17 @@ fastlife/templates/Th.jinja,sha256=GdxKPkbdTNTR83PyOYr_M4IonyH99O-wjdi-7QBjAvg,1
|
|
49
50
|
fastlife/templates/Thead.jinja,sha256=gp3T4XiEk5zgih0gmmLcVke-Z8AgTol7AQrRtVev480,35
|
50
51
|
fastlife/templates/Tr.jinja,sha256=m999VbUMeHDkw_-JsXqtMEZsA9Zklr8eA-NiIk5FFm8,84
|
51
52
|
fastlife/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
|
-
fastlife/templates/pydantic_form/Boolean.jinja,sha256=
|
53
|
-
fastlife/templates/pydantic_form/Checklist.jinja,sha256=
|
54
|
-
fastlife/templates/pydantic_form/Dropdown.jinja,sha256=
|
53
|
+
fastlife/templates/pydantic_form/Boolean.jinja,sha256=1Y54P3AGLE8wd-TcowDsZTY_-XID0AJSqXVjbc-C6WM,471
|
54
|
+
fastlife/templates/pydantic_form/Checklist.jinja,sha256=WCyGFQe7wIYbta1v8L8ZghDQmESIpdUDggoNxwHcHKE,781
|
55
|
+
fastlife/templates/pydantic_form/Dropdown.jinja,sha256=WbF6V37UCPMNsCvSyaIQ65nclUDUZY1TrNmDjQMq4Ck,554
|
55
56
|
fastlife/templates/pydantic_form/Error.jinja,sha256=Wb5NnVRc4U7ZGKmYV7s4eGenWEug8WK9li48iTlX4cQ,121
|
56
|
-
fastlife/templates/pydantic_form/Hidden.jinja,sha256=
|
57
|
+
fastlife/templates/pydantic_form/Hidden.jinja,sha256=NF8Od_mSSnRJAxWqsgeD1C5YzqJso-HCeDjGbpHjmlE,86
|
57
58
|
fastlife/templates/pydantic_form/Hint.jinja,sha256=O0ZsAQnATcG0a_qLQfrwM6VZHmAw3k1W33WYlEBUas8,123
|
58
|
-
fastlife/templates/pydantic_form/Model.jinja,sha256=
|
59
|
-
fastlife/templates/pydantic_form/Sequence.jinja,sha256=
|
60
|
-
fastlife/templates/pydantic_form/Text.jinja,sha256=
|
61
|
-
fastlife/templates/pydantic_form/Union.jinja,sha256=
|
62
|
-
fastlife/templates/pydantic_form/Widget.jinja,sha256=
|
59
|
+
fastlife/templates/pydantic_form/Model.jinja,sha256=3BdrzNYF-b5Ug-mDYwqSOJXjGnzHYjeIU5LT5ZRQduQ,504
|
60
|
+
fastlife/templates/pydantic_form/Sequence.jinja,sha256=hOa4cVMz-3ssH3e4AM_1PtXSVWyOtgTnPcAbY3DPUSI,1437
|
61
|
+
fastlife/templates/pydantic_form/Text.jinja,sha256=7OJt4rC11-XCKFKDP8lIsFy6M33pRW9ceD9K-irhiJg,461
|
62
|
+
fastlife/templates/pydantic_form/Union.jinja,sha256=h-l6XnowKKW9-iSxw9U1A4ZCT5XnuhDvrAamusGwq5s,987
|
63
|
+
fastlife/templates/pydantic_form/Widget.jinja,sha256=yDgdr4adlSiolornrUCsXUJYlhGtRYQRIucDIcV48-g,286
|
63
64
|
fastlife/templating/__init__.py,sha256=UY_hSTlJKDZnkSIK-BzRD4_AXOWgHbRuvJsKAS9ljgE,307
|
64
65
|
fastlife/templating/binding.py,sha256=noY9QrArJGqB1X80Ny-0zk1Dg6T9mMXahjEcIiHvioo,1648
|
65
66
|
fastlife/templating/renderer/__init__.py,sha256=UJUX3T9VYjPQUhS5Enz3P6OtwftimKoGGpoQEpewVFA,181
|
@@ -80,7 +81,7 @@ fastlife/testing/__init__.py,sha256=vuqwoNUd3BuIp3fm7nkvmYkIGjIimf5zUGhDkeWrg2s,
|
|
80
81
|
fastlife/testing/testclient.py,sha256=izNTkFgArIUrdSemNl3iiEDdsiUfnb2TtfKnZi3Jwv8,20546
|
81
82
|
fastlife/views/__init__.py,sha256=nn4B_8YTbTmhGPvSd20yyKK_9Dh1Pfh_Iq7z6iK8-CE,154
|
82
83
|
fastlife/views/pydantic_form.py,sha256=KJtH_DK8em0czGPsv0XpzGUFhtycyXdeRldwiU7d_j4,1257
|
83
|
-
fastlifeweb-0.
|
84
|
-
fastlifeweb-0.
|
85
|
-
fastlifeweb-0.
|
86
|
-
fastlifeweb-0.
|
84
|
+
fastlifeweb-0.8.0.dist-info/LICENSE,sha256=F75xSseSKMwqzFj8rswYU6NWS3VoWOc_gY3fJYf9_LI,1504
|
85
|
+
fastlifeweb-0.8.0.dist-info/METADATA,sha256=OuLzpWKIPXlhuZGS-zDqtNTcGuMIPlnyPaOhBID4mPU,1833
|
86
|
+
fastlifeweb-0.8.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
87
|
+
fastlifeweb-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|