我在进行测试登陆的时候,一直提示url有问题,但是找不到问题,请老师帮忙看下。
Page not found (404)
Request Method:
POST
Request URL:
http://127.0.0.1:8000/login/login
Using the URLconf defined in Mxonline.urls, Django tried these URL patterns, in this order:
^xadmin/
^$ [name='index']
^login/$ [name='login']
The current URL, login/login, didn't match any of these.
我的url配置如下,
urlpatterns = [
url(r'^xadmin/', xadmin.site.urls),
url('^$', TemplateView.as_view(template_name="index.html"), name="index"),
url('^login/$',user_login,name="login"),
]