简体   繁体   中英

django-cumulus : syncstatic command not found

I installed cumulus with - pip install django-cumulus and all the necessary things to my app settings file. But when i do django-admin.py syncstatic I get Unknown command: 'syncstatic' . Can you please point me. what am I doing wrong.

Doc I followed - http://pypi.python.org/pypi/django-cumulus

My env details :

Python 2.7.3
Django 1.4.2
django-cumulus 1.0.5
python-cloudfiles 1.7.10

Edit:

When I do it with manage.py from my project I get following error

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

I have included the following settings in my 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'

To summarise - you need to use the manage.py local to the project you installed so it can use the appropriate settings (not django-admin.py as stated in the docs).

The TypeError was raised if the authentication fields aren't set.

Your code here:

CUMULUS = {
...
    'CUMULUS_API_KEY': 'myapikey',
    'CUMULUS_CONTAINER': 'mycontainer',
...
}

Should instead be (note no CUMULUS_ prefix):

CUMULUS = {
...
    'API_KEY': 'myapikey',
    'CONTAINER': 'mycontainer',
...
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM