Fix static file serving by setting static_folder and removing custom route

parent 5c1c889b
......@@ -34,7 +34,7 @@ from .api import api_bp
from .admin import admin_bp
from .utils import get_current_user_session, login_required, admin_required
app = Flask(__name__, template_folder='../templates')
app = Flask(__name__, template_folder='../templates', static_folder='../static')
app.secret_key = os.environ.get('FLASK_SECRET_KEY', 'dev-secret-key-change-in-production')
os.makedirs('../static', exist_ok=True)
......@@ -1280,11 +1280,6 @@ def admin_delete_user(user_id):
@app.route('/static/<path:filename>')
def serve_static(filename):
return send_from_directory('../static', filename)
@app.route('/image.jpg')
def serve_logo():
return send_from_directory('..', 'image.jpg')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment