I’m generating a .less file via django’s templating. I’m essentially doing this the same way I would with html pages using a base less file…
@import: "somefile.less";
// The bg image
body {background-image: url('{% block image %}{% endblock %}');}
and another less file to extend it
{% extends "baseless/normal.less" %}
{% block image %}trees.jpg{% endblock %}
This is actually working fine, except that Django is removing lines from the output. this basically breaks the less file as I have a lot of //comments requiring line breaks.
@import: "somefile.less";// The bg image body {background-image: url('{trees.jpg');}
Is there a way to prevent it from doing this?
By the way, use django-compressor to compile less files.