간단한 django 1.4 프로젝트를 생성했으며 syncdb를 실행하여 (postgres) db 스키마를 생성하려고합니다. 이 오류를 받고 있어요 : - 같은"settings.DATABASES가 부적절하게 구성되었습니다."django 1.4와 syncdb를 수행하는 중 오류가 발생했습니다.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs
cursor = connection.cursor()
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/dummy/base.py", line 15, in complain
raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured.Please supply the ENGINE value. Check settings documentation for more details.
내 settings.py 파일을 찾습니다 -
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'test', # Or path to database file if using sqlite3.
'USER': 'test', # Not used with sqlite3.
'PASSWORD': 'test', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
내가 psql의 확인을 사용하여 데이터베이스에 연결할 수 있습니다 - 어떤 아이디어? 미리 감사드립니다!
'./manage.py diffsettings '의 출력에있는'DATABASES' 행은 어떻게 보이나요? – okm
DATABASES = { '기본': { '엔진': 'django.db.backends.', '이름': '', '호스트': '', '사용자': '', '비밀번호 : '포트': ''}}. 그거 잘못된 거 같아? 어떻게 고칠 수 있니? – bzo