Django错误 - settings.DATABASES配置不正确

时间:2014-04-22 21:53:39

标签: python django python-2.7 devstack

我遇到了Django 1.6.2的问题。每当我运行stack.sh(devstack)时,我都会收到以下错误。

2014-04-22 17:24:36 + cd /opt/stack/horizon
2014-04-22 17:24:36 + python manage.py syncdb --noinput
2014-04-22 17:24:36 Traceback (most recent call last):
2014-04-22 17:24:36   File "manage.py", line 23, in <module>
2014-04-22 17:24:36     execute_from_command_line(sys.argv)
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
2014-04-22 17:24:36     utility.execute()
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
2014-04-22 17:24:36     self.fetch_command(subcommand).run_from_argv(self.argv)
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
2014-04-22 17:24:36     self.execute(*args, **options.__dict__)
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
2014-04-22 17:24:36     output = self.handle(*args, **options)
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 415, in handle
2014-04-22 17:24:36     return self.handle_noargs(**options)
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs
2014-04-22 17:24:36     cursor = connection.cursor()
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 157, in cursor
2014-04-22 17:24:36     cursor = self.make_debug_cursor(self._cursor())
2014-04-22 17:24:36   File "/usr/local/lib/python2.7/dist-packages/django/db/backends/dummy/base.py", line 15, in complain
2014-04-22 17:24:36     raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
2014-04-22 17:24:36 django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
  

$ DJANGO_SETTINGS_MODULE = openstack_dashboard.settings ./manage.py   runserver验证模型... 0错误发现2014年4月22日 -   21:37:57 Django 1.6.2版,使用设置   &#39; openstack_dashboard.settings&#39;启动开发服务器   127.0.0.1:8000使用CONTROL-C退出服务器。

如果有人能帮助我,我会很感激,因为我是devstack的新手。

非常感谢

1 个答案:

答案 0 :(得分:0)

Django版本1.6.2 它导致问题,旧版本的django中的某些类被删除,所以你应该升级新版本只需输入:pip install django --upgrade然后就可以正常了