Hi Niels,
I think you're just missing an import. Try adding "from restish import
templating" to the top of the module that uses the @templating.page
decorator.
However, unless you have a strange use case, I'm not sure a Mako
template is the ideal way of rendering JSON. I would probably render
the result using a json module.
import json
from restish import http, resource
class ExampleResource(resource.Resource):
@resource.GET(accept='json')
def json(self, request):
obj = {...}
return http.ok([], json.dumps(obj))
Hope that helps.
- Matt