From c90471defdd552b4a8c2073914cfd49e7d9f2ca0 Mon Sep 17 00:00:00 2001 From: Paul Everitt Date: Mon, 12 Aug 2013 19:59:33 -0400 Subject: Forgot to add the subdir --- docs/quick_tour/json/views.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/quick_tour/json/views.py (limited to 'docs/quick_tour/json/views.py') diff --git a/docs/quick_tour/json/views.py b/docs/quick_tour/json/views.py new file mode 100644 index 000000000..583e220c7 --- /dev/null +++ b/docs/quick_tour/json/views.py @@ -0,0 +1,13 @@ +from pyramid.view import view_config + + +@view_config(route_name='hello', renderer='hello_world.pt') +def hello_world(request): + return dict(name=request.matchdict['name']) + + +# Start View 1 +@view_config(route_name='hello_json', renderer='json') +def hello_json(request): + return [1, 2, 3] + # End View 1 \ No newline at end of file -- cgit v1.2.3