cache busting on CSS files
This commit is contained in:
5
app.py
5
app.py
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user