Skip to content

Instantly share code, notes, and snippets.

@reebalazs
Created November 16, 2013 10:01
Show Gist options
  • Select an option

  • Save reebalazs/7498336 to your computer and use it in GitHub Desktop.

Select an option

Save reebalazs/7498336 to your computer and use it in GitHub Desktop.
injecting json to a template
import json
@view_config(route_name='project', renderer="index.mako")
def project(request):
users = ["mahesh", "hari"]
return {
'users': json.dumps(users),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment