1. Odd Otter Co
  2. Untitled project
  3. django-djaboto


Garth Johnson  committed 656c03e

Fixing STATIC issues

  • Participants
  • Parent commits 42d3fb3
  • Branches master

Comments (0)

Files changed (1)

File djaboto/management/commands/aws.py

View file
 import json
 from django.core.management.base import BaseCommand
 import djaboto
+from django.conf import settings
 PROJECT_TEMPLATES_DIR = os.path.join(os.path.dirname(djaboto.__file__), 'recipe')
         print(fab_colors.yellow("Collecting static files from included modules..."))
+        ###TODO: the directory should be puled from the settings.py file
         with fab_api.settings(
                             fab_api.cd('~/django/%s' % fab_api.env.SITENAME),
                             fab_api.prefix('source ~/django/python/bin/activate')):
             # Link the media files
-            if fab_exists('~/django/%s/httpdocs' % fab_api.env.SITENAME):
-                fab_api.sudo('rm -rf ~/django/%s/httpdocs' % fab_api.env.SITENAME)
+            if fab_exists('~/django/%s/httpdocs/static' % fab_api.env.SITENAME):
+                fab_api.sudo('rm -rf ~/django/%s/httpdocs/static' % fab_api.env.SITENAME)
             fab_api.run('python manage.py collectstatic -l --noinput --verbosity=0')
     def set_awsApacheconf(self, domain=None):