Media stuff
parent
34a5ee7416
commit
a13b67d80e
|
@ -31,7 +31,7 @@ def staticfiles():
|
||||||
'%s/media/js/src/modules/snipt.js' % BASE_PATH,
|
'%s/media/js/src/modules/snipt.js' % BASE_PATH,
|
||||||
]
|
]
|
||||||
local('cat %s > %s/media/cache/snipt.js' % (' '.join(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):
|
def deploy(m):
|
||||||
staticfiles()
|
staticfiles()
|
||||||
|
@ -40,7 +40,8 @@ def deploy(m):
|
||||||
local('hg commit -m \'%s\'' % m)
|
local('hg commit -m \'%s\'' % m)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
local('hg push')
|
local('hg push')
|
||||||
|
|
||||||
#run('hglu')
|
run('hg pull -u')
|
||||||
#run('pm collectstatic')
|
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
|
biplist
|
||||||
Django
|
Django
|
||||||
django-annoying
|
django-annoying
|
||||||
|
django-appconf
|
||||||
django-bcrypt
|
django-bcrypt
|
||||||
|
django_compressor==dev
|
||||||
django-grappelli
|
django-grappelli
|
||||||
django-pagination
|
django-pagination
|
||||||
django-taggit
|
django-taggit
|
||||||
|
@ -18,6 +20,7 @@ python-postmark
|
||||||
pyyaml
|
pyyaml
|
||||||
South
|
South
|
||||||
uuid
|
uuid
|
||||||
|
versiontools
|
||||||
Werkzeug
|
Werkzeug
|
||||||
|
|
||||||
hg+https://bitbucket.org/ubernostrum/django-registration#egg=django-registration
|
hg+https://bitbucket.org/ubernostrum/django-registration#egg=django-registration
|
||||||
|
|
10
settings.py
10
settings.py
|
@ -84,6 +84,7 @@ STATICFILES_DIRS = (
|
||||||
STATICFILES_FINDERS = (
|
STATICFILES_FINDERS = (
|
||||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
'compressor.finders.CompressorFinder',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Make this unique, and don't share it with anybody.
|
# Make this unique, and don't share it with anybody.
|
||||||
|
@ -136,6 +137,7 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
|
|
||||||
|
'compressor',
|
||||||
'django_bcrypt',
|
'django_bcrypt',
|
||||||
'pagination',
|
'pagination',
|
||||||
'postmark',
|
'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
|
# Extensions
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% load verbatim %}
|
{% load compress verbatim %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="{% block html-class %}{% endblock %}">
|
<html lang="en" class="{% block html-class %}{% endblock %}">
|
||||||
|
@ -8,11 +8,14 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="description" content="Long-term memory for coders. Share and store code snippets." />
|
<meta name="description" content="Long-term memory for coders. Share and store code snippets." />
|
||||||
<link rel="icon" href="{{ STATIC_URL }}images/favicon.ico">
|
<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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/jquery.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>
|
<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/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/site.js"></script>
|
||||||
<script type="text/javascript" src="{{ STATIC_URL }}js/src/modules/snipt.js"></script>
|
<script type="text/javascript" src="{{ STATIC_URL }}js/src/modules/snipt.js"></script>
|
||||||
|
{% endcompress %}
|
||||||
|
|
||||||
{% else %}
|
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/ace.js"></script>
|
||||||
<link rel="stylesheet" href="{{ STATIC_URL }}cache/snipt.css" />
|
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/theme-tomorrow.js"></script>
|
||||||
<script type="text/javascript" src="{{ STATIC_URL }}cache/snipt.js"></script>
|
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/ace/mode-javascript.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">{% block js %}window.user = '{{ request.user.username }}';
|
<script type="text/javascript">{% block js %}window.user = '{{ request.user.username }}';
|
||||||
window.pub = {{ public|lower }};{% endblock %} </script>
|
window.pub = {{ public|lower }};{% endblock %} </script>
|
||||||
|
|
Loading…
Reference in New Issue