Skip to content

Commit e697b4f

Browse files
committed
allow auth none
1 parent be2a01d commit e697b4f

File tree

5 files changed

+3
-4
lines changed

5 files changed

+3
-4
lines changed

examples/first_app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ def get(id:int):
4848
btn_del = Button('Delete', hx_delete='/', value=id, name="id")
4949
btn_back = Button('Back', hx_get='/')
5050
return Page('Todo details', Div(todos[id].title), btn_del, btn_back)
51-

fasthtml/_modidx.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'lib_path': 'fasthtml'},
88
'syms': { 'fasthtml.all': {},
99
'fasthtml.authmw': {},
10+
'fasthtml.cli': {},
1011
'fasthtml.components': { 'fasthtml.components._FindElems': ('components.html#_findelems', 'fasthtml/components.py'),
1112
'fasthtml.components._FindElems.__init__': ( 'components.html#_findelems.__init__',
1213
'fasthtml/components.py'),

fasthtml/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def _from_body(req, arg, p):
9595

9696
async def _find_p(req, arg:str, p):
9797
anno = p.annotation
98-
if arg.lower()=='auth': return req.scope['auth']
98+
if arg.lower()=='auth': return req.scope.get('auth', None)
9999
if isinstance(anno, type):
100100
if issubclass(anno, Request): return req
101101
if issubclass(anno, HtmxHeaders): return _get_htmx(req)

fasthtml/fastapp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ def clear(id): return Div(hx_swap_oob='innerHTML', id=id)
3030

3131
def Container(*cs, **kwargs): return Main(*cs, **kwargs, cls='container', hx_push_url='true', hx_swap_oob='true', id='main')
3232
def Page(title, *con): return Title(title), Container(H1(title), *con)
33-

nbs/02_xtend.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"id": "80f4f9d8",
1616
"metadata": {},
1717
"source": [
18-
"# Components"
18+
"# Component extensions"
1919
]
2020
},
2121
{

0 commit comments

Comments
 (0)