Reputation: 3608
I followed the below url to move my static files to Amazon S3.
http://blog.doismellburning.co.uk/2012/07/14/using-amazon-s3-to-host-your-django-static-files/
and here is my static configuration in settings.py
if not DEBUG:
INSTALLED_APPS += ('storages',)
AWS_STORAGE_BUCKET_NAME = os.environ['mybucket']
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
STATIC_URL = 'http://%s.s3.amazonaws.com/'%AWS_STORAGE_BUCKET_NAME
else:
STATIC_URL = '/static/'
STATIC_ROOT = ''
# Additional locations of static files
STATICFILES_DIRS = (
('assets',os.path.join(PROJECT_DIR, '../static')),
)
after this when I try
python manage.py collectstatic
I get the following message
Unknown command: 'collectstatic'
what could be the issue. I haven't set the Aws Access Key., Secret Key anywhere.
Upvotes: 0
Views: 144
Reputation: 6766
Add the staticfiles app to the installed apps.
'django.contrib.staticfiles',
The collectstatic
is managed by the above app.
Upvotes: 1