add missing files
This commit is contained in:
parent
7a2d4c5801
commit
dd3182f385
|
@ -0,0 +1,14 @@
|
|||
# https://github.com/kolypto/j2cli#customization
|
||||
|
||||
# http://jinja.pocoo.org/docs/2.10/api/#jinja2.Environment
|
||||
def j2_environment_params(): return dict(
|
||||
autoescape = True,
|
||||
trim_blocks = True,
|
||||
lstrip_blocks = True,
|
||||
keep_trailing_newline = True,
|
||||
extensions = ("jinja2.ext.do", "jinja2.ext.loopcontrols"),
|
||||
)
|
||||
|
||||
def j2_environment(env): return (env.globals.update(
|
||||
my_function = lambda v: 'my function says "{}"'.format(v),
|
||||
), env)[1]
|
|
@ -0,0 +1,6 @@
|
|||
#from jinja2 import Markup
|
||||
import json
|
||||
|
||||
def to_json(obj):
|
||||
#return Markup(json.dumps(obj))
|
||||
return json.dumps(obj)
|
Loading…
Reference in New Issue