django constance:AttributeError:'module'对象没有属性'_backend'

时间:2014-03-22 00:55:01

标签: python django attributeerror

我正在将网站从django 1.4升级到django 1.6.2,并且constance管理页面出错,报告:

AttributeError: 'module' object has no attribute '_backend'

错误发生在:

/python2.7/constance/admin.py in changelist_view, line 87

这是:

    # First load a mapping between config name and default value
    if not self.has_change_permission(request, None):
        raise PermissionDenied
    default_initial = ((name, default)
        for name, (default, help_text) in settings.CONFIG.items())
    # Then update the mapping with actually values from the backend
    initial = dict(default_initial,
87->      **dict(config._backend.mget(settings.CONFIG.keys())))
    form = ConstanceForm(initial=initial)
    if request.method == 'POST':
        form = ConstanceForm(request.POST)
        if form.is_valid():
            form.save()
            # In django 1.5 this can be replaced with self.message_user

我已升级常量,但无法正常工作。有谁知道原因?谢谢!

0 个答案:

没有答案