FastAPI # 0029 # Serving Static Files with FastAPI

preview_player
Показать описание
#python #fastapi
Рекомендации по теме
Комментарии
Автор

Good job
But it is not working for separated endpoint file for each path

jdotsystem
Автор

At around 7:05 you mentioned flask instead of FastAPI

sarahasad
Автор

Would you please add UI for login screen. It would be tricky for newbie like me. First login page and little bit of JAVASCRIPT to handle error if user login with incorrect username or password. Once logged in successfully how do we keep user's last page track when he/she press back button. I mean how to we keep him authorised as long as he is logged in

sarahasad
Автор

Hi, thank you for your tutorial. It works, as long as I use jinja2 from an endpoint defined in main.py to render the templates.
But my problem is, that I mount the staticFiles in my main.py, but want to render the templates in a different module. When I call on my template generator, I get an 'url_for' is undefined". My guess is, that my module is not aware of the StaticFiles Middleware mounted in the main. Does anybody have an idea how to solve this? Thanks for reading!

tahalaraki
welcome to shbcf.ru