网页地址重定向
from flask import render_template
from flask import Flask
from flask import abort, redirect, url_for
app = Flask(__name__)
# @app.errorhandler(404)
# def page_not_found(error):
# return render_template('404.html'), 404
@app.route('/')
def index():
return redirect(url_for('login'))
@app.route('/login')
def login():
abort(401)
#return render_template('404.html')