Guest User

Untitled

a guest
Feb 18th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. template_dir = os.path.join(os.path.dirname(__file__), 'views')
  2. env = jinja2.Environment(
  3. loader=jinja2.FileSystemLoader(template_dir),
  4. autoescape=True)
  5.  
  6. self.render('some_template.html', env=env) # render function
  7.  
  8. app/
  9. shared/
  10. header.html <-- templates within modules need to access these
  11. nav.html
  12. modules/
  13. module_a/
  14. handler.py
  15. templates/
  16. my_template.html <-- needs access to partials from 'shared/'
  17. module_b/
  18. module_c/
Add Comment
Please, Sign In to add comment