Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added collectstatic to fab rebuild.

Creating media folder correctly now if none exists.
  • Loading branch information...
commit a6db934aff3140169cdacdd8f6ad3f8ca6a768c5 1 parent c2161a2
@mbrochh mbrochh authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 website/webapps/django/myproject/fabfile/local.py
View
7 website/webapps/django/myproject/fabfile/local.py
@@ -136,6 +136,7 @@ def rebuild():
"""
rebuild_db()
rebuild_media()
+ local('./manage.py collectstatic --noinput')
def rebuild_db():
@@ -155,10 +156,10 @@ def rebuild_db():
def rebuild_media():
"""Copies media fixtures into your media_root."""
- files_to_delete = os.path.join(MEDIA_ROOT, '*')
- local('rm -rf %s' % files_to_delete)
+ local('rm -rf %s' % MEDIA_ROOT)
media_fixtures_path = os.path.join(PROJECT_ROOT,
- 'test_media/fixtures/media/*')
+ 'test_media/fixtures/media/')
+ local('mkdir -p %s' % media_fixtures_path)
local('cp -rf %s %s' % (media_fixtures_path, MEDIA_ROOT))
Please sign in to comment.
Something went wrong with that request. Please try again.