Skip to content

Instantly share code, notes, and snippets.

@wegorich
Last active August 29, 2015 14:11
Show Gist options
  • Save wegorich/34e1ba377d75853edb06 to your computer and use it in GitHub Desktop.
Save wegorich/34e1ba377d75853edb06 to your computer and use it in GitHub Desktop.
How generate path to assets at Django
css_css = Bundle(
'css/css.css',
filters=['cssrewrite'],
output='compiled_css.%(version)s{0}.css'.format(settings.GLOBAL_CACHE_LETTER))
register('css', css_css)
{% assets 'css' %}
<link rel="stylesheet" href="{{ ASSET_URL }}">
{% endassets %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment