Tracy of AI
8/10/2018 - 1:50 PM

abort

abort a route, and reroute it to another page

#Abort
from flask import abort()
@app.route('/')
def index():
 abort(404) #returns 404 error
 render_template('index.html') #this never gets executed