fnp
/
fnpdjango.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pre_collectstatic hook
[fnpdjango.git]
/
fnpdjango
/
deploy
/
__init__.py
diff --git
a/fnpdjango/deploy/__init__.py
b/fnpdjango/deploy/__init__.py
index
6edaebc
..
f47790d
100644
(file)
--- a/
fnpdjango/deploy/__init__.py
+++ b/
fnpdjango/deploy/__init__.py
@@
-73,6
+73,7
@@
def deploy():
install_requirements()
symlink_current_release()
migrate()
install_requirements()
symlink_current_release()
migrate()
+ pre_collectstatic()
collectstatic()
restart()
collectstatic()
restart()
@@
-237,6
+238,11
@@
def migrate():
run('%(app_path)s/ve/bin/python manage.py syncdb --noinput' % env, pty=True)
run('%(app_path)s/ve/bin/python manage.py migrate' % env, pty=True)
run('%(app_path)s/ve/bin/python manage.py syncdb --noinput' % env, pty=True)
run('%(app_path)s/ve/bin/python manage.py migrate' % env, pty=True)
+def pre_collectstatic():
+ print '>>> pre_collectstatic'
+ for task in env.get('pre_collectstatic', []):
+ execute(task)
+
def collectstatic():
"""Collect static files"""
print '>>> collectstatic'
def collectstatic():
"""Collect static files"""
print '>>> collectstatic'