Django compressor tags ignored on production machine -
i'm using django compressor (1.3) seems ignored on production machine.
i've tested on local (with manage.py run server
), , both css , js being amalgamated (although not minified). on development machine, {% compress %}
tags seem ignored.
my base template looks -
{% load compress %} <!doctype html> <html lang="en-gb"> <head> {% block css %} {% compress css %} <link rel='stylesheet' type='text/css' href='{{ static_url }}css/base.css' media="all"/> <link rel='stylesheet' type='text/css' href='{{ static_url }}css/nav.css' media="all"/> <link rel='stylesheet' type='text/css' href='{{ static_url }}css/catalog.css' media="all"/> <link rel='stylesheet' type='text/css' href='{{ static_url }}css/cart.css' media="all"/> <link rel='stylesheet' type='text/css' href='{{ static_url }}css/content.css' media="all"/> {% endcompress %} {% endblock css %}
'compressor'
listed in installed apps setting , i've set compress_enabled
true
(in order test on local machine).
i expect i'm missing obvious i've been searching while now..
update
django-compressor installed on production machine (using pip install -r requirements.txt
in virtualenv).
debug
set false
, i'm using following static files finders -
staticfiles_finders = ( 'django.contrib.staticfiles.finders.appdirectoriesfinder', 'django.contrib.staticfiles.finders.filesystemfinder', 'compressor.finders.compressorfinder', )
further update
i can compress inline (within html) if add inline
parameter {% compress %}
tag. nothing happens when use file
parameter (i'd rather use external file can cached - sticking inline option isn't ideal).
Comments
Post a Comment