'admin' is not a registered namespace in Django 1.4

前端 未结 6 701
离开以前
离开以前 2020-12-31 04:05

I\'m attempting to upgrade quite a large Django project to the newly released Django 1.4, and I\'m having some issues when running python manage.py test.

<
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 04:29

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

    I had the following:

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

    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.

    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.

提交回复
热议问题