Skip to content
Snippets Groups Projects
Commit 1f708f3b authored by Sarra Ouelhadj's avatar Sarra Ouelhadj
Browse files

testing heroku deployment

parent 4f364e31
No related branches found
No related tags found
1 merge request!7testing heroku deployment
from flask import Flask
app = Flask(__name__)
app.config.from_object("config.TestingConfig")
app.config.from_object("config.ProductionConfig")
from YKWIM import views
\ No newline at end of file
File deleted
File deleted
......@@ -9,7 +9,7 @@ def index():
datasetURL=request.form["datasetURL"]
file = request.files["templateFile"]
file.save(os.path.join(app.config['UPLOAD_FOLDER'],secure_filename(file.filename)))
uml_image = pl.plantUML2Image(app.config['UPLOAD_FOLDER']+file.filename, "svg")
uml_image = pl.plantUML2Image(app.config['UPLOAD_FOLDER']+secure_filename(file.filename), "svg")
return render_template("index.html", uml_image=url_for('getDocumentLink',document_link=uml_image))
else:
return render_template("index.html")
......
......@@ -9,9 +9,9 @@ class Config(object):
UPLOAD_FOLDER = ""
class ProductionConfig(Config):
pass
UPLOAD_FOLDER = "/tmp/"
class DevelopementConfig(Config):
class DevelopmentConfig(Config):
DEBUG = True
UPLOAD_FOLDER = MYDIR+"/YKWIM/results/"
......
......@@ -2,4 +2,4 @@
from YKWIM import app
if __name__ == "__main__":
app.run(host="https://semantic-lifting-method.herokuapp.com/")
\ No newline at end of file
app.run()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment