Website/main.py aktualisiert
This commit is contained in:
@@ -1954,6 +1954,16 @@ def register():
|
||||
return render_template("register.html")
|
||||
|
||||
|
||||
@app.route('/download-sample')
|
||||
def download_sample():
|
||||
# Ensure the file is only served from the specific directory
|
||||
directory = os.path.join(app.root_path, 'static', 'downloads')
|
||||
try:
|
||||
return send_from_directory(directory, 'download_sample.pdf', as_attachment=True)
|
||||
except FileNotFoundError:
|
||||
abort(404)
|
||||
|
||||
|
||||
@app.route('/preise', methods=['GET'])
|
||||
def preise():
|
||||
return render_template("preise.html")
|
||||
|
||||
Reference in New Issue
Block a user