Closed carlosnatalino closed 2 months ago
Hey,
You can put in any module you want (e.g. jinja.py
, templates.py
) and then init that object in main.py
before starting the server. Or you can simply create and init it in main.py
, since most of your routes will return HTML.
@zhanymkanov thanks for the suggestion!
Hi,
I am starting a new project that will use FastAPI, but most of the routes will return HTML rendered through Jinja2. My plan is to have specific folders for each module of my system. What do you suggest as the file/place where to create the
Jinja2Templates
object so that I can import it in each one of the modules?Thanks in advance.