Skip to content
Snippets Groups Projects
Commit 9f6df81e authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix for pyinstaller

parent 7b20cfc0
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
import os
import sys
from flask import Flask
from .config_reader import AppConfigReader
from .lib.crons import Crons
......@@ -31,7 +32,11 @@ def launch(mode="webserver", debug=False):
app_title = "D-GENIES - Dotplot large Genomes in an Interactive, Efficient and Simple way"
# Init Flask:
app = Flask(__name__, static_url_path='/static')
if getattr(sys, 'frozen', False):
template_folder = os.path.join(sys._MEIPASS, 'templates')
app = Flask(__name__, template_folder=template_folder, static_url_path='/static')
else:
app = Flask(__name__, static_url_path='/static')
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = config_reader.max_upload_file_size
app.config['SECRET_KEY'] = 'dsqdsq-255sdA-fHfg52-25Asd5'
......
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