开发者

ImproperlyConfigured: You need to specify NAME in your Django settings file

I'm almost there!! in deploying EveryBlock's ebcode in my mac OSX - here is my settings.py:

http://pastebin.com/ndQ57LCH

This is the entire error:

  Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/django/core/servers/basehttp.py", line 280, in run
    self.result = application(self.environ, self.start_response)
  File "/Library/Python/2.6/site-packages/django/core/servers/basehttp.py", line 674, in __call__
    return self.application(environ, start_response)
  File "/Library/Python/2.6/site-packages/django/core/handler开发者_如何学Gos/wsgi.py", line 234, in __call__
    signals.request_started.send(sender=self.__class__)
  File "/Library/Python/2.6/site-packages/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/Library/Python/2.6/site-packages/django/db/__init__.py", line 90, in reset_queries
    for conn in connections.all():
  File "/Library/Python/2.6/site-packages/django/db/utils.py", line 101, in all
    return [self[alias] for alias in self]
  File "/Library/Python/2.6/site-packages/django/db/utils.py", line 93, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)
  File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/base.py", line 11, in __init__
    self.ops = PostGISOperations(self)
  File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 91, in __init__
    vtup = self.postgis_version_tuple()
  File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 445, in postgis_version_tuple
    version = self.postgis_lib_version()
  File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 425, in postgis_lib_version
    return self._get_postgis_func('postgis_lib_version')
  File "/Library/Python/2.6/site-packages/django/contrib/gis/db/backends/postgis/operations.py", line 406, in _get_postgis_func
    cursor = self.connection._cursor()
  File "/Library/Python/2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 121, in _cursor
    raise ImproperlyConfigured("You need to specify NAME in your Django settings file.")
ImproperlyConfigured: You need to specify NAME in your Django settings file.

Please advise.


  1. Use either the one-database setup (DATABASE_xxx = ...) or the multiple-database (DATABASES dict) setup
  2. Don't prepend "DATABASE_" to the dictionary keys, e.g. in DATABASES["users"]). This is where the error comes from.
  3. Don't share your database password on SO


I think you might have forgotten to set the NAME property in your DATABASES setting:

DATABASES setting

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜