Source

PylonsWikiNG / src / layout / tutorial / handlers.py

from pylons.views import action

from tutorial.models import DBSession
from tutorial.models import Model

class WikiHandler(object):
    def __init__(self, request):
        self.request = request

    @action(renderer='mytemplate.mak')
    def index(self):
        dbsession = DBSession()
        root = dbsession.query(Model).filter(Model.name==u'root').first()
        return {'root':root, 'project':'tutorial'}