简体   繁体   English

如何让Flask检测静态文件中的更改?

[英]How do you get Flask to detect changes in static files?

I need Flask to detect changes made in files in the static folder, say .css, .js, .jpg files. 我需要Flask来检测静态文件夹中文件的更改,例如.css,.js,.jpg文件。 I have disabled caching for certain views but I would like to know if there is a way to do it with Flask. 我已经禁用了某些视图的缓存,但是我想知道是否可以使用Flask进行缓存。

使用网络资产烧瓶资产来管理您的静态内容,但它更适合于管理js或CSS内容

尝试使用以下API Scenerio

app = Flask(__name__, static_url_path='')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM