button to redirect to marp server

This commit is contained in:
dechert 2021-06-18 15:50:40 +02:00
parent 152efedf7a
commit 34314fe90c
3 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.idea
csvmarp
csvconvertervenv
# ---> Python
# Byte-compiled / optimized / DLL files

View File

@ -118,6 +118,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

View File

@ -11,5 +11,6 @@
<!-- will call e.g. route /tagebuch/download/2021-02 -->
<a class="btn btn-primary" href="{{url_for('download_file')}}">Download Markdown File</a>
<a class="btn btn-primary" href="{{url_for('download_pdf_file')}}">Download PDF File</a>
<a class="btn btn-primary" href="{{url_for('redirect_to_marp')}}">Go To Marp Server</a>
</p>
{% endblock %}