我在我的应用程序设置文件中安装了 -pip install django-cumulus
以及所有必要的东西。但是当我这样做时,django-admin.py syncstatic
我得到了Unknown command: 'syncstatic'
。你能指点我吗。我究竟做错了什么。
我关注的文档 - http://pypi.python.org/pypi/django-cumulus
我的环境细节:
Python 2.7.3
Django 1.4.2
django-cumulus 1.0.5
python-cloudfiles 1.7.10
编辑:
当我manage.py
从我的项目中执行此操作时,出现以下错误
File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/cumulus/management/commands/syncstatic.py", line 54, in handle
self.sync_files()
File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/cumulus/management/commands/syncstatic.py", line 60, in sync_files
servicenet=self.USE_SERVICENET) File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/cloudfiles/__init__.py", line 98, in get_connection
return Connection(*args, **kwargs)
File "/home/jimit/python/environments/forkodecrm/local/lib/python2.7/site-packages/cloudfiles/connection.py", line 84, in __init__
raise TypeError("Incorrect or invalid arguments supplied")
TypeError: Incorrect or invalid arguments supplied
我在我的 settings.py 中包含了以下设置
# cumulus rackspace config
CUMULUS = {
'USERNAME': 'myusername',
'CUMULUS_API_KEY': 'myapikey',
'CUMULUS_CONTAINER': 'mycontainer',
'STATIC_CONTAINER': 'mycontainer',
'USE_SERVICENET': False, # whether to use rackspace's internal private network
'CUMULUS_FILTER_LIST': [] # a list of files to exclude from sync }
DEFAULT_FILE_STORAGE = 'cumulus.storage.CloudFilesStorage'
STATICFILES_STORAGE = 'cumulus.storage.CloudFilesStaticStorage'