且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

'admin'不是Django 1.4中的注册名称空间

更新时间:2023-12-04 10:52:16

事实证明,这是由于设置文件中TEMPLATE_LOADERS键的顺序所致.

As it turns out, this was due to the order of the TEMPLATE_LOADERS key in my settings file.

我有以下内容:

TEMPLATE_LOADERS = (
    'django.template.loaders.app_directories.Loader',
    'django.template.loaders.filesystem.Loader',
)

,这在某种程度上导致了反向管理URL时导致的错误.切换两个回合解决了这个问题.我很想知道这是怎么发生的,因为在空白的Django 1.4项目中无法重现.

which, somehow, caused the error when reversing admin URLs. Switching the two round solved the issue. I would love to know how this happens, as it isn't reproducible in a blank Django 1.4 project.

可重复的 settings.AUTH_PROFILE_MODULEAttributeError.事实证明,这是Django 1.4中的一个错误,该错误是在发布日此处提交的.

What was reproducible, however, was the AttributeError for settings.AUTH_PROFILE_MODULE. Turns out this is a bug in Django 1.4, which was filed on release day here.