Here's the scenario:
I'm running Django 1.3.1, utilizing staticfiles, and django-compressor (latest stable) to, among other things, compile LESS files.
I have an "assets" directory that's hooked into staticfiles with STATICFILES_DIRS
(for project-wide static resources). In that directory I have a "css" directory and in that a "lib.less" file that contains LESS variables and mixins.
So the physical path is <project_root>/assets/css/lib.less
and it's served at /static/css/lib.less
.
In one of my apps' static directory, I have another LESS file that needs to import the one above. The physical path for that is <project_root>/myapp/static/myapp/css/file.less
and it would be served at /static/myapp/css/file.less
.
My first thought was:
@import "../../css/lib.less"
(i.e. based on the URL, go up to levels from /static/myapp/css
to /static/
, then traverse down into /static/css/lib.less
).
However, that doesn't work, and I've tried just about every combination of URLs and physical paths I can think of and all of them give me FilterError
s in the template, resulting from not being able to find the file to import.
Anyone have any ideas what the actual import path should be?