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/templating.py CHANGED
@@ -1,4 +1,6 @@
1
- from typing import Any, Dict, Mapping, Optional
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: Dict,
18
+ context: dict,
17
19
  status_code: int = 200,
18
- headers: Optional[Mapping[str, str]] = None,
19
- media_type: Optional[str] = None,
20
- background: Optional[BackgroundTask] = None,
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: Dict, __name: str, **path_params: Any) -> URL:
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: Optional[Dict] = None,
59
+ context: dict | None = None,
58
60
  status_code: int = 200,
59
61
  ) -> _TemplateResponse:
60
62
  context = context or {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sqladmin
3
- Version: 0.17.0
3
+ Version: 0.18.0
4
4
  Summary: SQLAlchemy admin for FastAPI and Starlette
5
5
  Project-URL: Documentation, https://aminalaee.dev/sqladmin
6
6
  Project-URL: Issues, https://github.com/aminalaee/sqladmin/issues
@@ -1,20 +1,20 @@
1
- sqladmin/__init__.py,sha256=p1XjIDLwQG28ayOpu2i60UG2NjL-mugVbHIaoARKpRo,216
2
- sqladmin/_menu.py,sha256=srm7SUSN4RiP1UQ9y5uHcTX9sVVcvEV-6z5sfvLq-fc,2623
3
- sqladmin/_queries.py,sha256=ucZpjUZgEw8BVY4Ln6yHzgpOWUsadBI8-Cvy6x3LZe4,9673
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=oerBfp90Bow0CsDonBdurCl8XfzNvVWprzm8C3PJmlI,2552
7
- sqladmin/application.py,sha256=yhh6VXMlkKf-xVN1HTSthco7ELBT3QgMohzuz-7TXqc,27206
8
- sqladmin/authentication.py,sha256=R4ad-8A5zWZ0vInK0pRj_oWirrQgWEY0Ng36j_NMC1U,2459
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=5CFibyLYliD48Y6p2AKzmtdQeTHxxcn5_7LieQmBpGY,11752
10
+ sqladmin/fields.py,sha256=1CWoVSMr1WkhBJww0-rakx71gRATeIGA6dKgc26z99M,11660
11
11
  sqladmin/formatters.py,sha256=K06la0mm9-Bs5UA9L6KGJC_X_lV3UHdJ3ENI6j9j2Zg,480
12
- sqladmin/forms.py,sha256=cFUSS0QBX_g3B5hCuDN7ckD0Hz2l-HWPqqgbmE4lqKw,21429
13
- sqladmin/helpers.py,sha256=wkMn0MfnRw4mC45rcusz4bV7Frb82kQvD04qTVFzc_4,8627
14
- sqladmin/models.py,sha256=Hx7oUvLhYaAvts9KBWCtuP3kSCguadb70uUtmvJp8J8,37530
15
- sqladmin/pagination.py,sha256=AmaZ5xNgPdBqTURYdOltz5IcSz8pY4qGQsr8evpUtHk,2256
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=uIOfv7AFS4i_pErxdj5bcKDKxXz28BLlzCkLVFHqZsI,2244
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=nnUwiUAWBSkGD645U2VcuMkRoN3tT2X8RxFaCFvx9ww,1944
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=YvsGQ4lCVXgDXDsUvOcpGPOIx9KEsrYpBGYQ4CO3jwk,1970
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=ZA_Y7SlMSgbUU5PET7JzvhIRFMTVw8BJ_46HvF-hhDY,2226
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.17.0.dist-info/METADATA,sha256=nNDF1rnQCDmFiJa0B_9XBs-SCPoFGy5dUrw7VOjY9W0,5270
48
- sqladmin-0.17.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
49
- sqladmin-0.17.0.dist-info/licenses/LICENSE.md,sha256=4zzpHQMPtND4hzIgJA5qnb4R_wRBWJlYGqNrZolBeP8,1488
50
- sqladmin-0.17.0.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.24.2
2
+ Generator: hatchling 1.25.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any