Skip to content
Snippets Groups Projects
Commit bd086b2c authored by Felix Chadwick-Smith's avatar Felix Chadwick-Smith
Browse files

Fix port retrieval and indentation in app.py

parent 753e6ca4
Branches
No related tags found
1 merge request!2Master
......@@ -3,7 +3,6 @@ from flask import Flask, render_template, request, redirect, url_for, send_from_
from flask_sqlalchemy import SQLAlchemy
from flask import abort, jsonify
app = Flask(__name__, static_folder='static')
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
......@@ -67,7 +66,6 @@ def download_cv():
print(f"Attempting to serve file: {file_path}")
return send_from_directory('static', 'my-cv.docx', as_attachment=True, mimetype='application/docx')
@app.route('/download_assessment/<filename>')
def download_assessment(filename):
try:
......@@ -86,7 +84,7 @@ if __name__ == '__main__':
# Create database tables
with app.app_context():
db.create_all()
# Retrieve the assigned port or default to 5000
port = int(os.environ.get('PORT', 5000))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment