|
|
@ -51,6 +51,7 @@ cache.init_app(app, config={'CACHE_TYPE': 'simple'}) |
|
|
|
# 静态文件配置 |
|
|
|
# 静态文件配置 |
|
|
|
from whitenoise import WhiteNoise |
|
|
|
from whitenoise import WhiteNoise |
|
|
|
app.wsgi_app = WhiteNoise(app.wsgi_app, root="../web/static/", prefix="static/", max_age=604800) |
|
|
|
app.wsgi_app = WhiteNoise(app.wsgi_app, root="../web/static/", prefix="static/", max_age=604800) |
|
|
|
|
|
|
|
app.jinja_env.trim_blocks = True |
|
|
|
|
|
|
|
|
|
|
|
# session配置 |
|
|
|
# session配置 |
|
|
|
# app.secret_key = uuid.UUID(int=uuid.getnode()).hex[-12:] |
|
|
|
# app.secret_key = uuid.UUID(int=uuid.getnode()).hex[-12:] |
|
|
|