"を展開する以上1つの値が必要":Djangoのデータベースルーターのエラーは:私は私のコードでこれをやったときに
DATABASE_ROUTERS = [
'some_value_here'
]
私が得た:
ValueError
at/
need more than 1 value to unpack
<some-path>/django/v1_2/core/handlers/base.py
inget_response
# Setup default url resolver for this thread. urlconf = settings.ROOT_URLCONF urlresolvers.set_urlconf(urlconf) resolver = urlresolvers.RegexURLResolver(r'^/', urlconf) # Apply request middleware for middleware_method in self._request_middleware: response = middleware_method(request) ... #<<<< Error is on this line if response: return response if hasattr(request, "urlconf"): # Reset url resolver with a custom urlconf. urlconf = request.urlconf
何が起こっていますか?何か案は?
あなたはそれが 'DATABASE_ROUTER'設定であることをどのように知っていますか?あなたが見ているエラー/トレースバックは何ですか? – sdolan
@sdolan:私がそれを取り除くと、それは機能するので、私は知っています。 :) – Mehrdad