4
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2025-08-14 17:08:09 +00:00

Pushing nodes to a database and generating graph from it

This commit is contained in:
Vanhala Antti
2014-05-30 17:34:00 +03:00
parent d6b0b97528
commit f51cf2025e
13 changed files with 293 additions and 318 deletions

View File

@@ -2,7 +2,7 @@ from flask import Flask, render_template, request
from graphData import insert_graph_data
app = Flask(__name__)
app.debug = False
app.config.from_pyfile('web_config.cfg')
@app.context_processor
@@ -21,8 +21,10 @@ def page_about():
@app.route('/sendGraph', methods=['POST'])
def page_sendGraph():
print "Receiving graph from %s" % (request.remote_addr)
data = request.form['data']
ret = insert_graph_data(data)
ret = insert_graph_data(app.config, data)
if ret:
return 'OK'
else: