Hot reloading Jinja2 templates with FastAPI – what’s the best practice? /u/EntropyGoAway Python Education

Hey folks,

I’ve been working with FastAPI and Jinja2Templates for a project, but I’m finding the development workflow a bit tedious since I have to manually refresh to see template changes. Right now I’m using the basic uvicorn –reload, but it only catches Python file changes.

Is there a recommended way to set up hot reloading for template files? I’ve seen some solutions with watchfiles, watchgod, and arel but I’m curious what the community typically uses for their development workflow.

Thanks in advance!

submitted by /u/EntropyGoAway
[link] [comments]

​r/learnpython Hey folks, I’ve been working with FastAPI and Jinja2Templates for a project, but I’m finding the development workflow a bit tedious since I have to manually refresh to see template changes. Right now I’m using the basic uvicorn –reload, but it only catches Python file changes. Is there a recommended way to set up hot reloading for template files? I’ve seen some solutions with watchfiles, watchgod, and arel but I’m curious what the community typically uses for their development workflow. Thanks in advance! submitted by /u/EntropyGoAway [link] [comments] 

Hey folks,

I’ve been working with FastAPI and Jinja2Templates for a project, but I’m finding the development workflow a bit tedious since I have to manually refresh to see template changes. Right now I’m using the basic uvicorn –reload, but it only catches Python file changes.

Is there a recommended way to set up hot reloading for template files? I’ve seen some solutions with watchfiles, watchgod, and arel but I’m curious what the community typically uses for their development workflow.

Thanks in advance!

submitted by /u/EntropyGoAway
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *