Merge remote-tracking branch 'origin/master'

This commit is contained in:
dechert
2021-06-21 12:12:54 +02:00
4 changed files with 65 additions and 1 deletions

View File

@@ -61,7 +61,10 @@ def upload_image():
csv_file.save(output_file_path)
# run converter
converter.convert(output_file_path, True)
if config_parser.prod_mode:
converter.convert(output_file_path, False)
else:
converter.convert(output_file_path, True)
return render_template("return_result.html")
# return redirect(request.url)
@@ -112,6 +115,17 @@ def valid_csv(filename):
# # return "bla"
# return render_template("tagebuch_output.html", markdown_result=data, markdown_filename=filename)
def get_marp_url():
if config_parser.prod_mode:
return "https://marp.swaghausen.de"
else:
return "http://localhost:4100"
@app.route('/marp')
def redirect_to_marp():
return redirect(get_marp_url(), code=302)
# return get_marp_url()
@app.route(URL_BASE_PATH + 'download', methods=['GET'])
# @auth.login_required