forked from EADMO/soochow_teach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21b765d
commit 6e39df4
Showing
5 changed files
with
153 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Generated by Django 4.2.3 on 2023-07-13 01:25 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('menu', '0003_person'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='Person', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,115 @@ | ||
<!-- 登录页面 --> | ||
<!-- 要有Post形式的表单 类似selfFrom -->0 | ||
<!-- 传入参数 stu_list (list) 学生的列表 | ||
利用 | ||
{% for stu in stu_list %} | ||
<html内容> (每次循环html内容都会被重复一次,可以配合智能间距或者自己设置) | ||
{% endfor %} | ||
来访问 (关于stu的属性见message.html) | ||
链接设置为 href = '/message/{{ stu.id }}/' | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html lang="zh"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{% block caption %} 苏州教到 {% endblock %}</title> | ||
<!-- bootstrap cdn --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" | ||
crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<!-- axios cdn --> | ||
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> | ||
<!-- jquery cdn --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" | ||
integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script> | ||
{% block header %}{% endblock %} | ||
</head> | ||
|
||
<body> | ||
{% block page %} | ||
<div class="container pt-5"> | ||
<h1 style="text-align: center">{% block title %}{% endblock %}</h1> | ||
<hr> | ||
<div class="row align-items-center justify-content-center"> | ||
<div class="col-8"> | ||
<form action="{% url 'loginParse' %}" method="post"> | ||
{% csrf_token %} | ||
<div class="login-form"> | ||
<h2>用户注册</h2> | ||
<div class="form-group"> | ||
<label for="username" class="form-label">用户名</label> | ||
<input type="text" class="form-control" id="username" placeholder="请输入用户名" name="username"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="password" class="form-label">密码</label> | ||
<input type="password" class="form-control" id="password" placeholder="请输入密码" name="password"> | ||
</div> | ||
<div class="form-check"> | ||
<label class="form-check-label"> | ||
<input class="form-check-input" type="checkbox" name="remember"> 记住密码 | ||
</label> | ||
</div> | ||
<button type="submit" class="btn btn-primary">提交</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- TODO: 在对应的bolck里完善基底页面,基底页面可以包含一些最基本的 比如上选择框和底部,这个讨论设计 --> | ||
{% endblock %} | ||
<style> | ||
@import url('https://fonts.googleapis.com/css2?family=Fangsong&display=swap'); | ||
|
||
.login-form { | ||
max-width: 60%; | ||
margin: 0 auto; | ||
padding: 20px; | ||
background-color: #f8f9fa; | ||
border-radius: 5px; | ||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); | ||
font-family: 'Fangsong', Arial, sans-serif; | ||
} | ||
|
||
.login-form h2 { | ||
text-align: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.login-form .form-group { | ||
margin-bottom: 20px; | ||
} | ||
|
||
.login-form .form-label { | ||
font-weight: bold; | ||
} | ||
|
||
.login-form .form-control { | ||
height: 40px; | ||
} | ||
|
||
.login-form .form-check { | ||
margin-top: 20px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.login-form .btn { | ||
padding: 10px 20px; | ||
background-color: #007bff; | ||
color: #fff; | ||
border: none; | ||
border-radius: 3px; | ||
cursor: pointer; | ||
} | ||
</style> | ||
</body> | ||
|
||
</html> |