sqladmin 0.17.0__py3-none-any.whl → 0.18.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.
- sqladmin/__init__.py +1 -1
- sqladmin/_menu.py +11 -9
- sqladmin/_queries.py +8 -6
- sqladmin/ajax.py +5 -3
- sqladmin/application.py +34 -35
- sqladmin/authentication.py +4 -2
- sqladmin/fields.py +35 -33
- sqladmin/forms.py +55 -58
- sqladmin/helpers.py +8 -10
- sqladmin/models.py +59 -1
- sqladmin/pagination.py +5 -3
- sqladmin/templates/sqladmin/_macros.html +33 -0
- sqladmin/templates/sqladmin/create.html +2 -18
- sqladmin/templates/sqladmin/edit.html +8 -24
- sqladmin/templating.py +9 -7
- {sqladmin-0.17.0.dist-info → sqladmin-0.18.0.dist-info}/METADATA +1 -1
- {sqladmin-0.17.0.dist-info → sqladmin-0.18.0.dist-info}/RECORD +19 -19
- {sqladmin-0.17.0.dist-info → sqladmin-0.18.0.dist-info}/WHEEL +1 -1
- {sqladmin-0.17.0.dist-info → sqladmin-0.18.0.dist-info}/licenses/LICENSE.md +0 -0
sqladmin/templating.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any, Mapping
|
|
2
4
|
|
|
3
5
|
import jinja2
|
|
4
6
|
from starlette.background import BackgroundTask
|
|
@@ -13,11 +15,11 @@ class _TemplateResponse(HTMLResponse):
|
|
|
13
15
|
self,
|
|
14
16
|
template: jinja2.Template,
|
|
15
17
|
content: str,
|
|
16
|
-
context:
|
|
18
|
+
context: dict,
|
|
17
19
|
status_code: int = 200,
|
|
18
|
-
headers:
|
|
19
|
-
media_type:
|
|
20
|
-
background:
|
|
20
|
+
headers: Mapping[str, str] | None = None,
|
|
21
|
+
media_type: str | None = None,
|
|
22
|
+
background: BackgroundTask | None = None,
|
|
21
23
|
):
|
|
22
24
|
self.template = template
|
|
23
25
|
self.context = context
|
|
@@ -42,7 +44,7 @@ class _TemplateResponse(HTMLResponse):
|
|
|
42
44
|
class Jinja2Templates:
|
|
43
45
|
def __init__(self, directory: str) -> None:
|
|
44
46
|
@jinja2.pass_context
|
|
45
|
-
def url_for(context:
|
|
47
|
+
def url_for(context: dict, __name: str, **path_params: Any) -> URL:
|
|
46
48
|
request = context["request"]
|
|
47
49
|
return request.url_for(__name, **path_params)
|
|
48
50
|
|
|
@@ -54,7 +56,7 @@ class Jinja2Templates:
|
|
|
54
56
|
self,
|
|
55
57
|
request: Request,
|
|
56
58
|
name: str,
|
|
57
|
-
context:
|
|
59
|
+
context: dict | None = None,
|
|
58
60
|
status_code: int = 200,
|
|
59
61
|
) -> _TemplateResponse:
|
|
60
62
|
context = context or {}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
sqladmin/__init__.py,sha256=
|
|
2
|
-
sqladmin/_menu.py,sha256=
|
|
3
|
-
sqladmin/_queries.py,sha256=
|
|
1
|
+
sqladmin/__init__.py,sha256=IIs_M7R7YdyDmI3K5Ror-SI_DvL_-uDcdiVYhvBnNXM,216
|
|
2
|
+
sqladmin/_menu.py,sha256=V6uKvIJGKrC0kmXq4M-DAgvPoHvgoGgKAw47OjsswGA,2609
|
|
3
|
+
sqladmin/_queries.py,sha256=KqxMABvepoA0j-8Xizg6ASYS-sZDSdm5iFlU74vilQY,9697
|
|
4
4
|
sqladmin/_types.py,sha256=3Zs0aPb14OS-9leahKxxzFopnIOiNftPZwdUmFDBKog,347
|
|
5
5
|
sqladmin/_validators.py,sha256=w0siGhZQq4MD__lu9Edua9DgMOoKET_kk-alpARFHIM,1604
|
|
6
|
-
sqladmin/ajax.py,sha256=
|
|
7
|
-
sqladmin/application.py,sha256=
|
|
8
|
-
sqladmin/authentication.py,sha256=
|
|
6
|
+
sqladmin/ajax.py,sha256=GWjK2nzeu2_huGYAuK6kA4YuFWt5l5kYsg9o0AXWVvs,2576
|
|
7
|
+
sqladmin/application.py,sha256=E6MxREu9Eijo0lb7nBHrQ8-Hl_Nq8NpO9hPFzVlR8ZE,27203
|
|
8
|
+
sqladmin/authentication.py,sha256=QdN3rLZFU25ihaIIi7iisb55-oFi4GtV_k1xGFvnS6w,2482
|
|
9
9
|
sqladmin/exceptions.py,sha256=6-E8m7rbWE3A7hNaSmB6CVqFzkEuwUpmU5AdGbouPCw,154
|
|
10
|
-
sqladmin/fields.py,sha256=
|
|
10
|
+
sqladmin/fields.py,sha256=1CWoVSMr1WkhBJww0-rakx71gRATeIGA6dKgc26z99M,11660
|
|
11
11
|
sqladmin/formatters.py,sha256=K06la0mm9-Bs5UA9L6KGJC_X_lV3UHdJ3ENI6j9j2Zg,480
|
|
12
|
-
sqladmin/forms.py,sha256=
|
|
13
|
-
sqladmin/helpers.py,sha256=
|
|
14
|
-
sqladmin/models.py,sha256=
|
|
15
|
-
sqladmin/pagination.py,sha256=
|
|
12
|
+
sqladmin/forms.py,sha256=S4lNrHh-iQiI_-xUKI3eCMySi9p9vbshXsPrNH-Qi7g,21361
|
|
13
|
+
sqladmin/helpers.py,sha256=VTPOFbWkiC1My6MYYyVUCAdg7UmnViiYE2ZigiXx628,8615
|
|
14
|
+
sqladmin/models.py,sha256=wecvNydQwUoKKmZ4neXyAt5aZfyB6OegB6emSwgnWXA,39599
|
|
15
|
+
sqladmin/pagination.py,sha256=iMPCGD2IKOe93iPfcXVZus3UWuNMRG9nDCFT3rZqVe8,2286
|
|
16
16
|
sqladmin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
sqladmin/templating.py,sha256=
|
|
17
|
+
sqladmin/templating.py,sha256=o-QMikTrOEgrneLonqCWR3SpAthr-9DoMwOmobM9zq0,2252
|
|
18
18
|
sqladmin/widgets.py,sha256=C_9GsqrnOiFkEHo6tBIkep9g4OCzMLeiB56lZM7bgqs,3110
|
|
19
19
|
sqladmin/statics/css/flatpickr.min.css,sha256=GzSkJVLJbxDk36qko2cnawOGiqz_Y8GsQv_jMTUrx1Q,16166
|
|
20
20
|
sqladmin/statics/css/fontawesome.min.css,sha256=CTSx_A06dm1B063156EVh15m6Y67pAjZZaQc89LLSrU,102217
|
|
@@ -31,11 +31,11 @@ sqladmin/statics/js/tabler.min.js,sha256=kuHV8gS0R5FupAkK6iExYXHKc5ZFbnSRYtVSorj
|
|
|
31
31
|
sqladmin/statics/webfonts/fa-brands-400.woff2,sha256=-q5vwKqUzFveUHZkfIF6IyBglqHL7aENHG89idYWPtE,109808
|
|
32
32
|
sqladmin/statics/webfonts/fa-regular-400.woff2,sha256=jn5eobFfYqsU29QXaOj7zSHMhZpOpdqBJFfucUKZ-zU,24948
|
|
33
33
|
sqladmin/statics/webfonts/fa-solid-900.woff2,sha256=cVKmkz7j1pDsKvPQnanXAXI9Fqo0EKbYDyj_iGbzuIA,150124
|
|
34
|
-
sqladmin/templates/sqladmin/_macros.html,sha256=
|
|
34
|
+
sqladmin/templates/sqladmin/_macros.html,sha256=QK--kje7XrH5Flhumf4luLafvTCvTioPMfrsrgTnWEo,2809
|
|
35
35
|
sqladmin/templates/sqladmin/base.html,sha256=MjcbhwWOEhwamvGevnH3FPlrjirvErhGhOdslpMLGrU,1592
|
|
36
|
-
sqladmin/templates/sqladmin/create.html,sha256=
|
|
36
|
+
sqladmin/templates/sqladmin/create.html,sha256=Vaj_OHLDIqnZF1HOz_g3ogTaCGZqPEfTJhaxezD1wjM,1396
|
|
37
37
|
sqladmin/templates/sqladmin/details.html,sha256=RuWdlsZw5m_gm24Tdn3APNlfKtTHfYw7BnZB0_Tj6Hw,3932
|
|
38
|
-
sqladmin/templates/sqladmin/edit.html,sha256=
|
|
38
|
+
sqladmin/templates/sqladmin/edit.html,sha256=geKD5j8ZLcMSciI80-qg_dQM3Sn_7g3_DeIONmSzQt8,1641
|
|
39
39
|
sqladmin/templates/sqladmin/error.html,sha256=gb-172SMuQKncv0QE8DQdQXeM-fw7oXC0LPLO3ia0IM,290
|
|
40
40
|
sqladmin/templates/sqladmin/index.html,sha256=vh_IhhYmHPOkdZNrXSEc4e9gXXeZ-nsRBCsJQ_mC7YI,71
|
|
41
41
|
sqladmin/templates/sqladmin/layout.html,sha256=iBIhypkXp6O3hAHDdMNc4pWd9yxt5mQy7o2lBQD-6Ec,1994
|
|
@@ -44,7 +44,7 @@ sqladmin/templates/sqladmin/login.html,sha256=Y_hlcIapfVFPNbSIbCe4Tbj5DLLD46emkS
|
|
|
44
44
|
sqladmin/templates/sqladmin/modals/delete.html,sha256=jTuv6geT-AhK5HTgRmntrJ8CEi98-kwKrVDrzkOQWhw,1092
|
|
45
45
|
sqladmin/templates/sqladmin/modals/details_action_confirmation.html,sha256=mN8LJ5OqypxNLAg2_GYZgQmGeK4E6t7JL5RmOEYuliM,1020
|
|
46
46
|
sqladmin/templates/sqladmin/modals/list_action_confirmation.html,sha256=U52LLNmpLaMuUZSVtGK15oLXsEu6m2S3l9zj9sjN6uM,1078
|
|
47
|
-
sqladmin-0.
|
|
48
|
-
sqladmin-0.
|
|
49
|
-
sqladmin-0.
|
|
50
|
-
sqladmin-0.
|
|
47
|
+
sqladmin-0.18.0.dist-info/METADATA,sha256=zvqNV0KCOIw2Xxx7q8WJVBZaam3_WyIW5jZIcDbNVcM,5270
|
|
48
|
+
sqladmin-0.18.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
49
|
+
sqladmin-0.18.0.dist-info/licenses/LICENSE.md,sha256=4zzpHQMPtND4hzIgJA5qnb4R_wRBWJlYGqNrZolBeP8,1488
|
|
50
|
+
sqladmin-0.18.0.dist-info/RECORD,,
|
|
File without changes
|