This commit is contained in:
Wang Keyi 2023-04-27 21:56:29 +08:00
parent cc02262c72
commit 02ffc91e28
5 changed files with 37 additions and 13 deletions

View File

@ -2,17 +2,17 @@
## 需要开发的部分
`@0001` 系统的登录功能,完成基本的用户数据库创建与登录功能,实现最初登陆功能
`@0001` 系统的登录功能,完成基本的用户数据库创建与登录功能,实现最初登陆功能
*`@0002` 系统登录前端*
*`@0003` 修改base基类作为模板引用*
`@0004` index界面部署和链接的部署
*`@0004` index界面部署和链接的部署*
`@0005` 404界面的反馈模板
*`@0005` 404界面的反馈模板*
`@0006` 500界面的反馈模板
*`@0006` 500界面的反馈模板*
@ -34,10 +34,8 @@
`&0006` 完成了index的部署 `2023/4/27/20:50`
`&0007` 完成404界面的部署 `2023/4/27/21:00`
`&0007` 完成 404 和 500 界面的部署 `2023/4/27/21:00`
## 需要修复的BUG
暂无

7
app.py
View File

@ -1,6 +1,8 @@
from flask import Flask, render_template
from blueprint.Login import bp_login
app = Flask(__name__)
app.register_blueprint(bp_login)
@app.route('/')
@ -8,11 +10,6 @@ def index():
return render_template('index.html')
@app.route('/login')
def login():
return render_template('login.html')
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404

19
blueprint/Login.py Normal file
View File

@ -0,0 +1,19 @@
# -*- coding: UTF-8 -*-
"""
@Project : FlaskProject
@File : Login.py
@IDE : PyCharm
@Author : 爱写屎山的王可奕
@Email : 1933658780@qq.com
@Date : 2023/4/28 9:12
@Comment : 登录功能的蓝图
"""
from flask import Blueprint, render_template
# 创建蓝图对象
bp_login = Blueprint('bp_login', __name__)
@bp_login.route('/login')
def login():
return render_template('login.html')

10
blueprint/__init__.py Normal file
View File

@ -0,0 +1,10 @@
# -*- coding: UTF-8 -*-
"""
@Project : FlaskProject
@File : __init__.py.py
@IDE : PyCharm
@Author : 爱写屎山的王可奕
@Email : 1933658780@qq.com
@Date : 2023/4/28 9:11
@Comment :
"""

View File

@ -6,5 +6,5 @@
@Author : 爱写屎山的王可奕
@Email : 1933658780@qq.com
@Date : 2023/4/27 15:59
@Comment :
@Comment : Flask的配置文件
"""