diff web/templog.py @ 188:ae5efca89001

working OK
author Matt Johnston <matt@ucc.asn.au>
date Fri, 07 Feb 2014 23:32:08 +0800
parents adbf70d1449f
children 101c66da848d
line wrap: on
line diff
--- a/web/templog.py	Fri Feb 07 08:00:10 2014 +0800
+++ b/web/templog.py	Fri Feb 07 23:32:08 2014 +0800
@@ -48,6 +48,14 @@
     start_epoch = time.mktime(start.timetuple())
     return log.graph_png(start_epoch, length_minutes * 60)
 
+@route('/set/update', method='post')
+def update():
+    post_json = json.loads(request.forms.data)
+
+    csrf_blob = post_json['csrf_blob']
+
+    return str(post_json['params'])
+
 @route('/set')
 def set():
     return bottle.template('set', 
@@ -117,14 +125,6 @@
     response.set_header('Cache-Control', "public, max-age=1296000")
     return bottle.static_file(filename, root='static')
 
-@route('/setparams', method='post')
-def update():
-    post_json = json.loads(request.forms.data)
-
-    csrf_blob = post_json['csrf_blob']
-
-    return str(post_json['params'])
-
 secure.setup_csrf()
 
 def main():