re-enable asset compression with django_compressor

Finally had time to figure out the problem "caused" by django_compressor,
so we can no re-enable it. Fixes #3
This commit is contained in:
Krzysztof Klimonda
2013-03-05 02:42:18 -08:00
parent 4580a700ab
commit 0cbd5bdaa1
4 changed files with 20 additions and 11 deletions

View File

@@ -34,6 +34,7 @@ STATICFILES_DIRS = [os.path.join(SITE_ROOT, 'pinry/static')]
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder'
)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
@@ -83,6 +84,7 @@ INSTALLED_APPS = (
'django.contrib.staticfiles',
'south',
'taggit',
'compressor',
'django_images',
'pinry.core',
'pinry.users',

View File

@@ -1,3 +1,5 @@
{% load static from staticfiles %}
{% load compress %}
<!DOCTYPE html>
<html lang="en">
<head>
@@ -21,9 +23,11 @@
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Monoton"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/css/bootstrap.min.css"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/file-uploader/3.1.1/fineuploader.css"/>
<link rel="stylesheet" href="{{ STATIC_URL }}css/messages.css"/>
<link rel="stylesheet" href="{{ STATIC_URL }}css/lightbox.css"/>
<link rel="stylesheet" href="{{ STATIC_URL }}css/pinry.css"/>
{% compress css %}
<link rel="stylesheet" href="{% static "css/messages.css" %}"/>
<link rel="stylesheet" href="{% static "css/lightbox.css" %}"/>
<link rel="stylesheet" href="{% static "css/pinry.css" %}"/>
{% endcompress %}
{% block extra_css %}{% endblock %}
<!-- End CSS -->
@@ -80,11 +84,13 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/file-uploader/3.1.1/jquery.fineuploader.min.js"></script>
<script src="{{ STATIC_URL }}js/helpers.js"></script>
<script src="{{ STATIC_URL }}js/messages.js"></script>
<script src="{{ STATIC_URL }}js/lightbox.js"></script>
<script src="{{ STATIC_URL }}js/pinry.js"></script>
<script src="{{ STATIC_URL }}js/pin-form.js"></script>
{% compress js %}
<script src="{% static "js/helpers.js" %}"></script>
<script src="{% static "js/messages.js" %}"></script>
<script src="{% static "js/lightbox.js" %}"></script>
<script src="{% static "js/pinry.js" %}"></script>
<script src="{% static "js/pin-form.js" %}"></script>
{% endcompress %}
{% block extra_js %}{% endblock %}
<!-- End JavaScript -->
</body>

View File

@@ -1,9 +1,9 @@
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = patterns('',
url(r'', include('pinry.core.urls', namespace='core')),
url(r'', include('pinry.users.urls', namespace='users')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
)
urlpatterns += staticfiles_urlpatterns()

View File

@@ -5,5 +5,6 @@ django-tastypie
django-braces
mock
factory-boy
django_compressor
http://github.com/mirumee/django-images/tarball/master#egg=django-images
http://github.com/hcarvalhoalves/django-taggit/tarball/master#egg=django-taggit