Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Sanic + Jinja2 for large project #1

Open
TechMaster opened this issue Apr 19, 2019 · 0 comments
Open

Sanic + Jinja2 for large project #1

TechMaster opened this issue Apr 19, 2019 · 0 comments

Comments

@TechMaster
Copy link

Hi all,
I am going to make an web site that will use Sanic and Jinja2.
I do not want to put all codes in a single Python file. Therefore I think of this project structure:

ViewControllers
   |--- ViewControllerA.py  //BluePrint + several Jinja2 template)
   |--- ViewControllerB.py
   |--- ViewControllerC.py
   |--- templateA.html
   |--- templateB.html
   |--- templateC.html
PluginFeatured  // can be installed from
   |--- ViewControllerX.py  (BluePrint + several Jinja2 template)
   |--- ViewControllerY.py
   |--- ViewControllerZ.py
   |--- templateX.html
   |--- templateY.html
   |--- templateZ.html

However I don't know how to pass @app.route... to ViewControllerxxx.py in sub folder.
Please help !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant