pygreen
pygreen copied to clipboard
use mako strict_undefined and allow user to provide an environment to template
There are 4 changes:
- Using strict_undefined mako template mode to ease the template debugging
- Return the exception stack as bytes to the client so you can see the debug trace from within browser
- When handling a directory, check if index.html exists. This makes the "pygreen serve" showing similar behavior as a static site.
- Allow user to provide a user defined python functions/objects in env.py centrally, such that you don't have to mix pure python code within your template.
EOF.