Skip to content

Commit 70ed50a

Browse files
committed
fixes #626
1 parent 3a9797e commit 70ed50a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

fasthtml/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ def __init__(self, debug=False, routes=None, middleware=None, title: str = "Fast
523523
from IPython.display import display,HTML
524524
if nb_hdrs: display(HTML(to_xml(tuple(hdrs))))
525525
middleware.append(cors_allow)
526-
self.on_startup,self.on_shutdown,self.lifespan,self.hdrs,self.ftrs = on_startup,on_shutdown,lifespan,hdrs,ftrs
526+
on_startup,on_shutdown = listify(on_startup) or None,listify(on_shutdown) or None
527+
self.lifespan,self.hdrs,self.ftrs = lifespan,hdrs,ftrs
527528
self.body_wrap,self.before,self.after,self.htmlkw,self.bodykw = body_wrap,before,after,htmlkw,bodykw
528529
secret_key = get_key(secret_key, key_fname)
529530
if sess_cls:

nbs/api/00_core.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
{
132132
"data": {
133133
"text/plain": [
134-
"datetime.datetime(2025, 1, 5, 14, 0)"
134+
"datetime.datetime(2025, 1, 6, 14, 0)"
135135
]
136136
},
137137
"execution_count": null,
@@ -1370,7 +1370,8 @@
13701370
" from IPython.display import display,HTML\n",
13711371
" if nb_hdrs: display(HTML(to_xml(tuple(hdrs))))\n",
13721372
" middleware.append(cors_allow)\n",
1373-
" self.on_startup,self.on_shutdown,self.lifespan,self.hdrs,self.ftrs = on_startup,on_shutdown,lifespan,hdrs,ftrs\n",
1373+
" on_startup,on_shutdown = listify(on_startup) or None,listify(on_shutdown) or None\n",
1374+
" self.lifespan,self.hdrs,self.ftrs = lifespan,hdrs,ftrs\n",
13741375
" self.body_wrap,self.before,self.after,self.htmlkw,self.bodykw = body_wrap,before,after,htmlkw,bodykw\n",
13751376
" secret_key = get_key(secret_key, key_fname)\n",
13761377
" if sess_cls:\n",

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ lib_name = fasthtml
44
version = 0.11.1
55
min_python = 3.10
66
license = apache2
7-
requirements = fastcore>=1.7.18 python-dateutil starlette>0.33 oauthlib itsdangerous uvicorn[standard]>=0.30 httpx fastlite>=0.0.9 python-multipart beautifulsoup4
7+
requirements = fastcore>=1.7.18 python-dateutil starlette>0.33 oauthlib itsdangerous uvicorn[standard]>=0.30 httpx fastlite>=0.1.1 python-multipart beautifulsoup4
88
dev_requirements = ipython lxml pysymbol_llm
99
black_formatting = False
1010
conda_user = fastai

0 commit comments

Comments
 (0)