STATICFILES_STORAGE = 'aliyun_oss.backends.oss.OSSStorage'
noah@noah-ubuntu-desktop:/mnt/data/nwblog$ python manage.py collectstatic
You have requested to collect static files at the destination
location as specified in your settings.
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/home/noah/.local/lib/python2.7/site-packages/django/core/management/init.py", line 363, in execute_from_command_line
utility.execute()
File "/home/noah/.local/lib/python2.7/site-packages/django/core/management/init.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/noah/.local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/noah/.local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/noah/.local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 199, in handle
collected = self.collect()
File "/home/noah/.local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 124, in collect
handler(path, prefixed_path, storage)
File "/home/noah/.local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 354, in copy_file
if not self.delete_file(path, prefixed_path, source_storage):
File "/home/noah/.local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 260, in delete_file
if self.storage.exists(prefixed_path):
File "/home/noah/.local/lib/python2.7/site-packages/django/utils/functional.py", line 238, in inner
self._setup()
File "/home/noah/.local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py", line 504, in _setup
self._wrapped = get_storage_class(settings.STATICFILES_STORAGE)()
File "/home/noah/.local/lib/python2.7/site-packages/django/core/files/storage.py", line 467, in get_storage_class
return import_string(import_path or settings.DEFAULT_FILE_STORAGE)
File "/home/noah/.local/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/noah/.local/lib/python2.7/site-packages/aliyun_oss/backends/oss.py", line 12, in
from aliyun_oss.oss.oss_api import OssAPI
File "/home/noah/.local/lib/python2.7/site-packages/aliyun_oss/oss/oss_api.py", line 652
print('\r%d%% ' % (rate_num), end=' ')
^
SyntaxError: invalid syntax