Created
March 23, 2012 16:28
-
-
Save eyeseast/2172461 to your computer and use it in GitHub Desktop.
LESS + Django Compressor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# via http://www.caktusgroup.com/blog/2012/03/05/using-less-django/ #} | |
{% load compress %} | |
{% if debug %} | |
// This is the client-side way to compile less and an ok choice for local dev | |
<link rel="stylesheet/less" type="text/css" media="all" href="{{ STATIC_URL }}less/style.less" /> | |
<script src="{{ STATIC_URL }}js/less-1.1.3.min.js"></script> | |
{% else %} | |
{% compress css %} | |
// This is the nifty django-compressor way to compile your less files in css | |
<link rel="stylesheet" type="text/less" media="all" href="{{ STATIC_URL }}less/style.less" /> | |
{% endcompress %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment