python学习
This commit is contained in:
0
web/controllers/account/Account.py
Normal file
0
web/controllers/account/Account.py
Normal file
@@ -1,8 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from flask import Blueprint
|
||||
from flask import Blueprint,render_template
|
||||
|
||||
route_index = Blueprint( 'index_page',__name__ )
|
||||
|
||||
@route_index.route("/")
|
||||
def index():
|
||||
return "Hello World"
|
||||
return render_template("index/index.html")
|
||||
8
web/controllers/static.py
Normal file
8
web/controllers/static.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from flask import Blueprint,send_from_directory
|
||||
from application import app
|
||||
route_static = Blueprint('static', __name__)
|
||||
|
||||
@route_static.route("/<path:filename>")
|
||||
def index( filename ):
|
||||
return send_from_directory( app.root_path + "/web/static/" ,filename )
|
||||
13
web/controllers/user/User.py
Normal file
13
web/controllers/user/User.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from flask import Blueprint,render_template
|
||||
|
||||
route_user = Blueprint( 'user_page',__name__ )
|
||||
@route_user.route("/login")
|
||||
def login():
|
||||
return render_template("user/login.html")
|
||||
@route_user.route("/edit")
|
||||
def edit():
|
||||
return render_template("user/edit.html")
|
||||
@route_user.route("/reset_pwd")
|
||||
def resetPwd():
|
||||
return render_template("user/reset_pwd.html")
|
||||
1
web/controllers/user/__init__.py
Normal file
1
web/controllers/user/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
Reference in New Issue
Block a user