Use Django Template Tags in JavaScript File -


i wondering if use template tag static in javascript file call csv file want pass d3 so:

{% static "js/data.csv" %} 

i'd javascript files separate html, because can long , messy. help.

use django-compressor

django-compressor lets optimize site condensing of required js or css 1 file , optimizing file size.

update: default, compressor convert relative urls absolute urls using static_url. if download development version, comes django template engine parser lets use django template code directly in css files, such {% static %} tag.
yuji 'tomita' tomita

read so post.


Comments