Answers for "how to set route from different python file in flask"

0

how to set route from different python file in flask

simple_page = Blueprint('simple_page', __name__, template_folder='templates')
@simple_page.route('/<page>')
def show(page):
    # stuff
   
from yourapplication.simple_page import simple_page

app = Flask(__name__)
app.register_blueprint(simple_page)
Posted by: Guest on June-06-2021

Code answers related to "how to set route from different python file in flask"

Python Answers by Framework

Browse Popular Code Answers by Language