Upload bugs solved: elim_dupl_res feature causes generation of a malformed content...
[living-lab-site.git] / cis / dummy_cis.py
diff --git a/cis/dummy_cis.py b/cis/dummy_cis.py
new file mode 100755 (executable)
index 0000000..cb94a1d
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+import web
+import sys
+
+urls = (
+    '/(.*)', 'Hello'
+)
+
+LOAD = sys.argv[2]
+print 'load is %s' % LOAD
+
+app = web.application(urls, globals())
+
+class Hello:
+    def GET(self, name):
+        if request == 'get_load':
+            resp = {"load": LOAD}
+            web.header('Content-Type', 'application/json')
+            return json.dumps(resp)
+    
+    def POST(self, request):
+        print web.data()
+
+        return request
+
+if __name__ == "__main__":
+    app.run()