Django1.4, Python2.7
I am currently trying to get django compressor to work locally, I installed django_compressor via pip install earlier, added it to my installed apps. Here is a copy of my base template....
************************
{% load i18n %}
{% load compress %}
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9" > <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8"/>
{% compress css %}
<link rel="stylesheet" media="all" href="{{ STATIC_URL }}css/style.css" type="text/css" charset="utf-8" />
{% endcompress %}
.....
************************
When I view the source it outputs the following....
**************************
<!doctype html> <!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]--> <!--[if IE 9 ]> <html class="ie9" > <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]--> <head> <meta charset="utf-8"/> <link rel="stylesheet" href="/media/CACHE/css/fbe3d01c9f33.css" type="text/css" media="all" />
**************************
So it is creating the cached css file, but it doesn't seem to be able to find it(ie page loads with no style applied to it), any ideas what it could be that I am missing?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/qpwRn4wDPycJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment