+def collectstatic():
+ """Collect static files"""
+ print '>>> collectstatic'
+ require('project_name', provided_by=[staging, production])
+ with cd('%(path)s/releases/current/%(project_name)s' % env):
+ run('../../../ve/bin/python manage.py collectstatic --noinput' % env, pty=True)
+
+def restart_gunicorn_debian():
+ """Restarts gunicorn server using debian script."""
+ print '>>> restart gunicorn'
+ require('project_name', provided_by=[staging, production])
+ with path('/sbin'):
+ sudo('gunicorn-debian restart %(project_name)s' % env, shell=False)
+