Thank you Michael this did indeed fix it.
Works a charm now, cheers.
This does already works for me though - not sure how? Perhaps the json
renderer parses the string returned by subprocess?
Or jinja2 deparses it twice? In the previous example I noticed that merely
putting {{r}} on a page
Craig,
The subprocess is returning a json-encoded string. This is a string. You
must parse it first via json.loads(subprocess.check_output(...)) if you
want to use the objects it contains in your template. Similarly you said
it's working with renderer="json" but it's actually not. You're
Hi there, if you can help me with this it will save what's left of my hair.
I want to have a jinja2 template render with variables passed in from an
external program. The views.py has this in it
@view_config(route_name='stats', renderer='templates/stats.jinja2')
def my_view_stats(request):