Django数据库路由器错误:“需要超过1个值才能解压缩”

时间:2011-06-26 00:26:50

标签: python django django-1.2

当我在我的代码中执行此操作时:

DATABASE_ROUTERS = [
    'some_value_here'
]

我得到了:

  在ValueError

/      

需要多于1个值才能解压缩

     <some-path>/django/v1_2/core/handlers/base.py

中的

get_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

发生了什么事?有什么想法吗?

2 个答案:

答案 0 :(得分:0)

尝试:

DATABASE_ROUTERS = [
    'some_value_here',
]

答案 1 :(得分:0)

从头开始,我只是错误:我需要模块名称,而不仅仅是类名。