django-pipeline
django-pipeline copied to clipboard
Get link to .css and .js files in tempalte
Hi,
I want to load some of my .css files and .js files "lazy". For this purpose I need only the url to the files.
Example
{% javascript 'startpage' %}
returns a
But I would like to do something like
var startpage_url = "{% javascript 'startpage' urlonly %}";
// load the script on a specific event (For example user scrolled down)
$(document.head).append($('<script>', { src: startpage_url }));
How can I do this? I guess this is not possible out of the box?
Not actually possible. MR #646 is proposed for this.