开发者

django STATIC_URL on production server

开发者 https://www.devze.com 2023-04-04 11:36 出处:网络
I want update same files from STATIC_URL. But they did\'t update, because browser cache statics. Can automatically make a setting.py

I want update same files from STATIC_URL. But they did't update, because browser cache statics.

Can automatically make a setting.py

STATIC_URL = '/static-%s/' % <AUTO_INCREMENT>

and regular setting i开发者_如何学编程n nginx?

Or may have a component?


Well, if these files are used for site design, i.e. they are css-files or images, you can use http://github.com/mintchaos/django_compressor or smth like this. It generates new css file and sets for all included images special token (directly in css) every time some of css files is updated.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号