I am trying to deploy a django site and can not get the manage.py collectstatic command to complete. It collects the majority of files but never finishes… returns the below traceback. I am using django1.3 and python2.7.
Also, DEBUG = False and 'django.contrib.staticfiles' is in my installed apps.
Traceback:
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 80, in handle_noargs
for path, storage in finder.list(ignore_patterns):
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/contrib/staticfiles/finders.py", line 210, in list
for path in utils.get_files(self.storage, ignore_patterns):
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site-packages/django/contrib/staticfiles/utils.py", line 21, in get_files
directories, files = storage.listdir(location)
File "/home/rowapparel/.virtualenvs/dev_ra_env/lib/python2.7/site- packages/django/core/files/storage.py", line 109, in listdir
raise NotImplementedError()
NotImplementedError
Again, it works for a lot of my static files, but not all. It seems to stop at the same file everytime, but when I ignore that app and/or file it still returns the above traceback.
Any ideas?
Per the django-storages docs, the proper way to have collectstatic put files in your s3 bucket is to define the following in your settings:
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'… you can not use
storeages.backends.s3.s3Storageas that backend does not define the listdir method… the boto backend does.