Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template_dir = os.path.join(os.path.dirname(__file__), 'views')
- env = jinja2.Environment(
- loader=jinja2.FileSystemLoader(template_dir),
- autoescape=True)
- self.render('some_template.html', env=env) # render function
- app/
- shared/
- header.html <-- templates within modules need to access these
- nav.html
- modules/
- module_a/
- handler.py
- templates/
- my_template.html <-- needs access to partials from 'shared/'
- module_b/
- module_c/
Add Comment
Please, Sign In to add comment