cache busting on CSS files

This commit is contained in:
2025-05-28 21:50:18 +02:00
parent b70e4624cb
commit c8dd4ac165
14 changed files with 24 additions and 19 deletions

5
app.py
View File

@@ -24,6 +24,7 @@ def create_app():
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'your-secure-secret-key-here')
app.config['UPLOAD_FOLDER'] = os.path.join(app.root_path, 'static', 'uploads')
app.config['CSS_VERSION'] = os.getenv('CSS_VERSION', '1.0.0') # Add CSS version for cache busting
# Initialize extensions
db.init_app(app)
@@ -36,6 +37,10 @@ def create_app():
def inject_csrf_token():
return dict(csrf_token=generate_csrf())
@app.context_processor
def inject_config():
return dict(config=app.config)
# User loader for Flask-Login
@login_manager.user_loader
def load_user(user_id):