diff options
Diffstat (limited to 'views/generic.json')
-rw-r--r-- | views/generic.json | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/views/generic.json b/views/generic.json new file mode 100644 index 0000000..23f5181 --- /dev/null +++ b/views/generic.json @@ -0,0 +1,11 @@ +{{ +### +# response._vars contains the dictionary returned by the controller action +### +try: + from gluon.serializers import json + response.write(json(response._vars),escape=False) + response.headers['Content-Type']='text/json' +except: + raise HTTP(405,'no json') +}} |