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):
return {'r': subprocess.check_output(['program_that_returns_json']),
'page': 'My Stats', 'next' : '/hello', 'prev': '/paydown'}

program_that_returns_json returns this kind of thing {'on_target' : 3425}

The template stats.jinja2 has 
We are this much on target: {{r.on_target}} 
The next page is {{next}}

{{next}} gets rendered but {{r.on_target}} does not.

The technique above works for me when renderer='json' but I need javascript 
to unpack the response and jquery to set content, variable by variable.  
Here I have a large list of them.  Can it work like I have guessed or ?

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to