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

Fix for pyinstaller

parent 9f6df81e
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,9 @@ def launch(mode="webserver", debug=False):
# Init Flask:
if getattr(sys, 'frozen', False):
template_folder = os.path.join(sys._MEIPASS, 'templates')
app = Flask(__name__, template_folder=template_folder, static_url_path='/static')
template_folder = os.path.join(sys.executable, '..', 'templates')
static_folder = os.path.join(sys.executable, '..', 'static')
app = Flask(__name__, template_folder=template_folder, static_folder=static_folder)
else:
app = Flask(__name__, static_url_path='/static')
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
......
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