summaryrefslogtreecommitdiff
path: root/docs/quick_tour/json/views.py
blob: 22aa8aad63cca31e7c98faadbe3196b9d8ef4e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
from pyramid.view import view_config


@view_config(route_name='hello', renderer='hello_world.jinja2')
def hello_world(request):
    return dict(name=request.matchdict['name'])


@view_config(route_name='hello_json', renderer='json')
def hello_json(request):
    return [1, 2, 3]