Django2.0中form表单提交跳转到另一个界面目录重复导致404?

1.写了个简单的from表单登陆跳转,提交之后登陆页面的路径重复报错404,

1.1)urls:

from django.contrib import admin
from django.urls import path ,re_path
from app01 import views


urlpatterns = [
    path('admin/', admin.site.urls),
    re_path('^login.html/$',views.login),
    re_path('^indexUser.html/$',views.index),
]

1.2)views代码:

def login(req):
    message=''
    print('userName',req.method)
    print('url'+req.path)
    # if req.method == "POST":
    #     userName = req.POST.get("userName")
    #     pwd = req.POST.get("pwd")
    #     if userName=='mufenglin' and pwd =='mufenglin':
    #         res = redirect('/index.html')
    #         res.set_cookie('userName',userName)
    #         return res
    #     else:
    #         message='用户名或者密码错误'
    return render(req,"login.html",{'message':message})


def index(req):
   #如果用户已经登陆,获取用户名
   #否则返回登陆页面

   print(req.COOKIES.get("userName"))
   if req.COOKIES.get("csrf_token"):
       userName = 'gongsunyang'
       return render(req,"indexUser.html",{'userName':userName})
   else:
       return redirect("/login.html")

1.3form表单

<!DOCTYPE HTML>
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
    <form action="login.html" method="post">
            {% csrf_token %}
            <div>
                <label for="user">用户名:</label>
                <input id ="user" type="text" name="userName"/>
            </div>
            <div>
                <label for="password">密码: </label>
                <input id="pwd" type="password" name="pwd"/>
            </div>
            <div>
                <input type="submit" value="登陆"/>
                <span style="color:#ffd155;">{{ message }}</span>
            </div>
    </form>
</body>
</html>

2.操作步骤:
图片说明

3.报错截图
图片说明

你的报错截图没有贴出来呢。