Media stuff
parent
34a5ee7416
commit
a13b67d80e
|
@ -31,7 +31,7 @@ def staticfiles():
|
|||
'%s/media/js/src/modules/snipt.js' % BASE_PATH,
|
||||
]
|
||||
local('cat %s > %s/media/cache/snipt.js' % (' '.join(js), BASE_PATH))
|
||||
local('/Users/Nick/.virtualenvs/snipt/bin/python %s/manage.py collectstatic --ignore grappelli --ignore admin --ignore ace --noinput' % BASE_PATH)
|
||||
local('/Users/Nick/.virtualenvs/snipt/bin/python %s/manage.py collectstatic --ignore grappelli --ignore admin --noinput' % BASE_PATH)
|
||||
|
||||
def deploy(m):
|
||||
staticfiles()
|
||||
|
@ -40,7 +40,8 @@ def deploy(m):
|
|||
local('hg commit -m \'%s\'' % m)
|
||||
except:
|
||||
pass
|
||||
|
||||
local('hg push')
|
||||
|
||||
#run('hglu')
|
||||
#run('pm collectstatic')
|
||||
run('hg pull -u')
|
||||
run('python manage.py collectstatic --ignore grappelli --ignore admin --noinput')
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
1464
media/css/style.css
1464
media/css/style.css
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,9 @@ BeautifulSoup
|
|||
biplist
|
||||
Django
|
||||
django-annoying
|
||||
django-appconf
|
||||
django-bcrypt
|
||||
django_compressor==dev
|
||||
django-grappelli
|
||||
django-pagination
|
||||
django-taggit
|
||||
|
@ -18,6 +20,7 @@ python-postmark
|
|||
pyyaml
|
||||
South
|
||||
uuid
|
||||
versiontools
|
||||
Werkzeug
|
||||
|
||||
hg+https://bitbucket.org/ubernostrum/django-registration#egg=django-registration
|
||||
|
|
10
settings.py
10
settings.py
|
@ -84,6 +84,7 @@ STATICFILES_DIRS = (
|
|||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
'compressor.finders.CompressorFinder',
|
||||
)
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
|
@ -136,6 +137,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.staticfiles',
|
||||
'django.contrib.admin',
|
||||
|
||||
'compressor',
|
||||
'django_bcrypt',
|
||||
'pagination',
|
||||
'postmark',
|
||||
|
@ -214,7 +216,13 @@ ABSOLUTE_URL_OVERRIDES = {
|
|||
#)
|
||||
#}
|
||||
|
||||
COMPRESS_CSS = True
|
||||
# CSS / JS Compression
|
||||
COMPRESS_OUTPUT_DIR = 'cache'
|
||||
COMPRESS_JS_FILTERS = []
|
||||
if DEBUG:
|
||||
COMPRESS_ROOT = os.path.join(BASE_PATH, 'media')
|
||||
else:
|
||||
COMPRESS_ROOT = STATIC_ROOT
|
||||
|
||||
# Extensions
|
||||
if DEBUG:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% load verbatim %}
|
||||
{% load compress verbatim %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="{% block html-class %}{% endblock %}">
|
||||
|
@ -8,11 +8,14 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="description" content="Long-term memory for coders. Share and store code snippets." />
|
||||
<link rel="icon" href="{{ STATIC_URL }}images/favicon.ico">
|
||||
{% if debug %}
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" />
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}css/themes.css" />
|
||||
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.css" />
|
||||
<link rel="stylesheet" type="text/scss" href="{{ STATIC_URL }}css/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/themes.css" />
|
||||
{% endcompress %}
|
||||
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/underscore.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/jquery.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/json2.js"></script>
|
||||
|
@ -26,14 +29,11 @@
|
|||
<script type="text/javascript" src="{{ STATIC_URL }}js/src/application.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/src/modules/site.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/src/modules/snipt.js"></script>
|
||||
{% endcompress %}
|
||||
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}cache/snipt.css" />
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}cache/snipt.js"></script>
|
||||
|
||||
{% endif %}<script type="text/javascript" src="/static/js/libs/ace/ace.js"></script>
|
||||
<script type="text/javascript" src="/static/js/libs/ace/theme-tomorrow.js"></script>
|
||||
<script type="text/javascript" src="/static/js/libs/ace/mode-javascript.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/ace.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/theme-tomorrow.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/mode-javascript.js"></script>
|
||||
|
||||
<script type="text/javascript">{% block js %}window.user = '{{ request.user.username }}';
|
||||
window.pub = {{ public|lower }};{% endblock %} </script>
|
||||
|
|
Loading…
Reference in New Issue