For django projects there is an awesome tool called django-compressor. It combines all js or css files under compress
template tag into single cached file, like this:
{% load compress %}
{% compress css %}
<link rel="stylesheet" href="/static/css/one.css" type="text/css" charset="utf-8">
<style type="text/css">p { border:5px solid green;}</style>
<link rel="stylesheet" href="/static/css/two.css" type="text/css" charset="utf-8">
{% endcompress %}
I'm wondering if there is anything like this for tornado projects? Or maybe any workaround/alternative solution?
I've found this project on github, but it's no longer maintained.
Take a look at tornado_utils, it should do what you want. Especially take look at tornado_static.py
tornado_static is a module for displaying static resources in a Tornado web application.
It can take care of merging, compressing and giving URLs ideal renamings suitable for aggressive HTTP caching.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With