Commit 4ce15bc2 authored by Jérome Perrin's avatar Jérome Perrin Committed by Sebastien Robin

move static files in a place where flask can serve them

parent 8b792e33
from flask import Flask, jsonify from flask import Flask, jsonify, redirect, url_for
from flask import request from flask import request
from crossdomain import crossdomain from crossdomain import crossdomain
from util import deunicodeData from util import deunicodeData
app = Flask(__name__) app = Flask(__name__)
global data global data
data = {'model': None, data = {'model': None,
'simulation_parameters': {}} 'simulation_parameters': {}}
@app.route("/") @app.route("/")
def welcome(): def welcome():
app.logger.debug('welcome') app.logger.debug('welcome')
return "Welcome to DREAM Simulation" return redirect(url_for('static', filename='index.html'))
@app.route("/addModel") @app.route("/addModel")
def addModel(): def addModel():
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}; };
priv.getUrl = function() { priv.getUrl = function() {
return $(document)[0].baseURI + "/dream_platform/" return "/";
}; };
priv.initJsPlumb = function () { priv.initJsPlumb = function () {
...@@ -377,4 +377,4 @@ ...@@ -377,4 +377,4 @@
value: DreamNamespace value: DreamNamespace
}); });
}(window, jQuery, jsPlumb, console, _)); }(window, jQuery, jsPlumb, console, _));
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment