Django-Web框架之实现登录功能

我们打开../sign/templates/index.html文件,实现一个登录功能。新增如下代码:

<!DOCTYPE html>
<html>
<head>
    <title>Django Page</title>
</head>
<body>
    <h1>发布会管理</h1>
    <form> 
        <input>name="username" type='text' placeholder="username"><br>
        <input>name="password" type="password" placeholder="password"><br>
        <button> id="btn" type="submit">登录</button>
    </form>
    </body>
</html>

然后我们开启django服务器。输入http://127.0.0.1:8000/index/  如图所示:

猜你喜欢

转载自www.cnblogs.com/fighter007/p/10085236.html