Google App Engine Django补丁中没有反向错误?
我正在使用Google App Engine来搭建Django。
当我尝试访问管理页面时,
我总是遇到这个错误:
在/admin/处出现了模板语法错误: 渲染时捕获到异常:找不到名为 'settings.django.contrib.auth.views.logout'的反向链接,参数 '()'和关键字参数'{}'。
这是一个全新的安装,我没有做太多更改。但是我 无法解决这个问题。
这是补丁中注册应用的urls.py文件:
urlpatterns = patterns('',
# Activation keys get matched by \w+ instead of the more specific
# [a-fA-F0-9]{40} because a bad activation key should still get to
# that way it can return a sensible "invalid key" message instead
# confusing 404.
url(r'^activate/(?P<activation_key>\w+)/$',
activate,
name='registration_activate'),
url(r'^login/$',
auth_views.login,
{'template_name': 'registration/login.html'},
name='auth_login'),
url(r'^logout/$',
auth_views.logout,
name='auth_logout'),
url(r'^password/change/$',
auth_views.password_change,
name='auth_password_change'),
url(r'^password/change/done/$',
auth_views.password_change_done,
name='auth_password_change_done'),
url(r'^password/reset/$',
auth_views.password_reset,
name='auth_password_reset'),
url(r'^password/reset/confirm/(?P<uidb36>.+)/(?P<token>.+)/$',
auth_views.password_reset_confirm,
name='auth_password_reset_confirm'),
url(r'^password/reset/complete/$',
auth_views.password_reset_complete,
name='auth_password_reset_complete'),
url(r'^password/reset/done/$',
auth_views.password_reset_done,
name='auth_password_reset_done'),
url(r'^register/$',
register,
name='registration_register'),
url(r'^register/complete/$',
direct_to_template,
{'template': 'registration/registration_complete.html'},
name='registration_complete'),
)
1 个回答
1
我找不到一个合适的答案来解决我的问题。不过,我暂时通过重新安装Django框架和应用引擎SDK解决了这个问题。