login.html 983 字节
Newer Older
1 2 3 4 5 6 7
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <style>
        #login {
8
            width: 320px;
9 10 11 12 13
            margin: 20px auto;
        }
        #login form div {
            margin: 10px 0;
        }
14 15 16 17
        .hint {
            color: red;
            font-size: 14px;
        }
18 19 20 21 22 23
    </style>
</head>
<body>
    <h1>用户登录</h1>
    <hr>
    <div id="login">
24
        <p class="hint">{{ hint }}</p>
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
        <form action="/login/" method="post">
            {% csrf_token %}
            <div>用户名: </div>
            <div>
                <input type="text" name="username" required>
            </div>
            <div>密码: </div>
            <div>
                <input type="password" name="password" required>
            </div>
            <div>
                <input type="submit" value="登录">
            </div>
        </form>
        <a href="/register">注册新用户</a>
    </div>
</body>
</html>