Source

tw2.core-docs-pyramid / myapp / myapp / views.py

1
2
3
4
5
6
7
8
9
def view_root(context, request):
    return {'items':list(context), 'project':'myapp'}

def view_model(context, request):
    return {'item':context, 'project':'myapp'}

def view_widget(context, request):
    context.fetch_data(request)
    return {'widget':context}