I got an error after introducing a static folder to my app. An "Error code: Unhandled Exception " shows up when I tried to load my website. I tried running collectstatic but only got the following error:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338,
in execute_from_command_line
utility.execute()
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330,
in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 190,
in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 41, i
n load_command_class
return module.Command()
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/
collectstatic.py", line 32, in __init__
self.storage.path('')
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/utils/functional.py", line 226, in inner
self._setup()
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py", line 39
4, in _setup
self._wrapped = get_storage_class(settings.STATICFILES_STORAGE)()
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py", line 39
, in __init__
*args, **kwargs)
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/core/files/storage.py", line 186, in __i
nit__
self.location = abspathu(self.base_location)
File "/home/cqcum6er/my-first-blog/myvenv/local/lib/python2.7/site-packages/django/utils/_os.py", line 37, in abspathu
if not isabs(path):
File "/home/cqcum6er/my-first-blog/myvenv/lib/python2.7/posixpath.py", line 61, in isabs
return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
The paths in settings.py were set to:
STATIC_URL = '/static/'
STATIC_ROOT = [
os.path.join(BASE_DIR, 'static')
]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]
I also specify the URL and Directory under my Web tab, but nothing is working:(