pygreen icon indicating copy to clipboard operation
pygreen copied to clipboard

use mako strict_undefined and allow user to provide an environment to template

Open yanghao opened this issue 6 years ago • 0 comments

There are 4 changes:

  1. Using strict_undefined mako template mode to ease the template debugging
  2. Return the exception stack as bytes to the client so you can see the debug trace from within browser
  3. When handling a directory, check if index.html exists. This makes the "pygreen serve" showing similar behavior as a static site.
  4. 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.

yanghao avatar Nov 14 '18 19:11 yanghao