Add json to global template context

just seems like a useful thing to have around...
This commit is contained in:
Lance Edgar 2017-11-02 21:38:16 -07:00
parent 7ccb38b5ab
commit 46293546b6

View file

@ -27,6 +27,7 @@ Event Subscribers
from __future__ import unicode_literals, absolute_import from __future__ import unicode_literals, absolute_import
import six import six
import json
import rattail import rattail
from rattail.db import model from rattail.db import model
@ -82,6 +83,7 @@ def before_render(event):
renderer_globals['tailbone'] = tailbone renderer_globals['tailbone'] = tailbone
renderer_globals['enum'] = request.rattail_config.get_enum() renderer_globals['enum'] = request.rattail_config.get_enum()
renderer_globals['six'] = six renderer_globals['six'] = six
renderer_globals['json'] = json
def add_inbox_count(event): def add_inbox_count(event):