2011-01-05 67 views
1

我幾乎在那裏!在我的Mac OSX部署EveryBlock的ebcode - 這是我的settings.py:錯誤配置:您需要在您的Django設置文件中指定NAME

http://pastebin.com/ndQ57LCH

這是整個錯誤:

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/handlers/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. 

請指教。

+1

共享整個配置(包括祕密密鑰等等)可能不是最好的計劃... – ChristopheD 2011-01-05 17:59:34

+0

它確定這是爲了測試不生產,所以我並不在乎 - 儘管感謝您的關注。 – David 2011-01-06 02:04:12

回答

5
  1. 使用一數據庫設置(DATABASE_xxx = ...多重數據庫(DATABASES字典)設置
  2. 不預置 「DATABASE_」 到字典鍵,例如在DATABASES["users"])。這是錯誤來自的地方。
  3. 不要SO
+0

非常感謝您的建議,我現在將採取一個措施 – David 2011-01-06 02:04:31

相關問題