Skip to content

Commit ee0dd80

Browse files
committed
adding django compressor
1 parent 5fc4d94 commit ee0dd80

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ dist/
1212
*.db
1313
.livereload
1414
*.swo
15+
myimgat/static/CACHE

myimgat/apps/wall/templates/wall/base.html

+6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{% extends "base.html" %}
22

3+
{% load compress %}
4+
35
{% block head %}
46
{% block css %}
7+
{% compress css %}
58
<link href="{{ STATIC_URL }}wall/css/reset.css" rel="stylesheet" type="text/css" />
69
<link href="{{ STATIC_URL }}wall/css/defaults.css" rel="stylesheet" type="text/css" />
710
<link href="{{ STATIC_URL }}wall/css/header.css" rel="stylesheet" type="text/css" />
@@ -11,6 +14,7 @@
1114
<link href="{{ STATIC_URL }}wall/css/login-popin.css" rel="stylesheet" type="text/css" />
1215
<link href="{{ STATIC_URL }}wall/css/crop-popin.css" rel="stylesheet" type="text/css" />
1316
<link href="{{ STATIC_URL }}wall/css/wall.css" rel="stylesheet" type="text/css" />
17+
{% endcompress %}
1418
{% endblock %}
1519

1620
{% block open_graph %}
@@ -59,6 +63,7 @@ <h1>{% block header_logo %}myimg.at{% endblock %}</h1>
5963
userAlbums: '/api/{username}.json'
6064
};
6165
</script>
66+
{% compress js %}
6267
<script src="{{ STATIC_URL }}wall/js/mootools-core-1.3.2-compat.js"></script>
6368
<script src="{{ STATIC_URL }}wall/js/mootools-more-1.3.2.1.js"></script>
6469
<script src="{{ STATIC_URL }}wall/js/wall.js"></script>
@@ -69,6 +74,7 @@ <h1>{% block header_logo %}myimg.at{% endblock %}</h1>
6974
<script src="{{ STATIC_URL }}wall/js/popin.js"></script>
7075
<script src="{{ STATIC_URL }}wall/js/crop-popin.js"></script>
7176
<script src="{{ STATIC_URL }}wall/js/init.js"></script>
77+
{% endcompress %}
7278
{% endblock %}
7379

7480
{% endblock %}

myimgat/requirements/project.txt

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ pycrypto==2.3
1414
python-openid==2.2.5
1515
wsgiref==0.1.2
1616
MySQL-python==1.2.3
17+
django_compressor==0.9.2
18+
BeautifulSoup==3.2.0
19+
html5lib==0.90

myimgat/settings.py

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
'django.contrib.staticfiles.finders.FileSystemFinder',
9393
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
9494
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
95+
'compressor.finders.CompressorFinder',
9596
)
9697

9798
# Make this unique, and don't share it with anybody.
@@ -145,6 +146,7 @@
145146
'wall',
146147

147148
# external apps
149+
'compressor',
148150
'shorturls',
149151
'social_auth',
150152
'south',
@@ -234,6 +236,8 @@
234236
THUMBOR_SECURITY_KEY = 'rivendell_rox'
235237
THUMBOR_SERVER = 'http://thby.nl'
236238

239+
COMPRESS = True
240+
237241
try:
238242
from local_settings import *
239243
except ImportError:

0 commit comments

Comments
 (0)