|
|
|
|
|
by bmelton
5419 days ago
|
|
If you're using Django, you might want to look into Django-Compressor (https://github.com/mintchaos/django_compressor#readme). It doesn't QUITE get what you're looking for as for the naming pattern, but it does automatically take your .css files, compress them into one (removing unnecessary whitespace and the like), and then replace: <link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/style2.css" />
<link rel="stylesheet" href="/style3.css" /> to something like: <link rel="stylesheet" href="/ax502b7.css" /> I'm currently working a bunch with Flask, which has something similar (http://pypi.python.org/pypi/Flask-Assets) that I'm not yet using, but I've gotten the basics down with SASS tacked into a Fabric script that compiles my CSS on each deploy. Thus far, this has meant a cache purge when deploying new assets, as I don't have the hashtag in the name (or even a datestamp) for that matter, so for that, I've looked into using Flask-Assets, but I'm not there yet. |
|