Created
June 9, 2012 06:23
-
-
Save rizkyabdilah/2899800 to your computer and use it in GitHub Desktop.
set jinja2 global environment on bottlepy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/python/bin/python | |
from bottle import BaseTemplate | |
class ExampleGlobal(object): | |
name = "Hello World" | |
gob = ExampleGlobal() | |
BaseTemplate.global_config('jinja2_global_env', {'gob': gob}) | |
## do with your creativity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment