當我這樣做在我的代碼:Django的數據庫路由器錯誤: 「需要比1點的值更解壓」
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