在Django中安装芹菜的问题

时间:2015-10-01 11:55:11

标签: django celery

这是我的django设置文件,我试着从这个链接here配置芹菜,但我得到如下错误,我在这里做错了什么,

这是抛出此错误的命令

python manage.py celeryd

raise ImproperlyConfigured("settings.DATABASES is improperly configured. " Improperly Configured: settings.DATABASES is improperly configured

DATABASES = {
  'default': {
},
'db1': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'hp',
    'USER': 'root',
    'PASSWORD': 'php123',
    'PORT': '3306'
    }
}

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'djcelery',
 )

BROKER_URL = "django://hp:hp@localhost:5672/<RABBIT_VHOST>"
#CELERY_RESULT_BACKEND = "database"

#choose the setting that matches your database of choice
CELERY_RESULT_DBURI = "mysql://root:php123@localhost/celery_db"

INSTALLED_APPS += ('kombu.transport.django', )

#put these two lines at the very bottom of the settings file
import djcelery
djcelery.setup_loader()

0 个答案:

没有答案