Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/views/generic.json
diff options
context:
space:
mode:
Diffstat (limited to 'views/generic.json')
-rw-r--r--views/generic.json11
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')
+}}