Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 谷歌应用引擎Django补丁中没有反向错误?_Python_Django_Google App Engine_Django Urls - Fatal编程技术网

Python 谷歌应用引擎Django补丁中没有反向错误?

Python 谷歌应用引擎Django补丁中没有反向错误?,python,django,google-app-engine,django-urls,Python,Django,Google App Engine,Django Urls,我正在使用补丁Django 当我尝试进入管理站点时 ,我不断得到这个错误: TemplateSyntaxError位于/admin/ 渲染时捕获到异常:反转 带有参数的“settings.django.contrib.auth.views.logout” 找不到“()”和关键字参数“{}” 这是一个新的安装,我没有改变太多。但我 我无法解决这个问题 这是内部补丁附带的url.py文件 注册应用程序: urlpatterns = patterns('', # Activation key

我正在使用补丁Django

当我尝试进入管理站点时

,我不断得到这个错误:

TemplateSyntaxError位于/admin/ 渲染时捕获到异常:反转 带有参数的“settings.django.contrib.auth.views.logout” 找不到“()”和关键字参数“{}”

这是一个新的安装,我没有改变太多。但我 我无法解决这个问题

这是内部补丁附带的url.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'),
)
urlpatterns=patterns(“”,
#激活密钥由\w+匹配,而不是由更具体的
#[a-fA-F0-9]{40}因为错误的激活密钥仍应访问
#这样,它可以返回一个合理的“无效密钥”消息
#令人困惑的404。
url(r'^activate/(?P\w+/$),
激活,
name='registration\u 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\u password\u change'),
url(r“^password/change/done/$”,
auth_views.password_change_done,
name='auth\u password\u change\u done',
url(r“^password/reset/$”,
auth_views.password_reset,
name='auth\u password\u reset'),
url(r'^password/reset/confirm/(?P.+)/(?P.+)/$),
验证视图。密码重置确认,
name='auth\u password\u reset\u confirm',
url(r“^password/reset/complete/$”,
验证视图。密码重置完成,
name='auth\u password\u reset\u complete',
url(r“^password/reset/done/$”,
auth_views.password_reset_done,
name='auth\u password\u reset\u done',
url(r“^register/$”,
登记
name='registration\u register'),
url(r“^register/complete/$”,
直接到模板,
{'template':'registration/registration_complete.html'},
name='registration_complete'),
)

我找不到问题的正确答案。无论如何,我通过重新安装Django框架和app engine SDK暂时解决了这个问题。

我不知道这里发生了什么,但我认为有一个线索,它将视图的名称命名为“settings.Django.contrib”,这有点奇怪。在settings.py中是否有ROOT_URLCONF的设置?