In flask, I have a blueprint that is getting a bit too long and I'd like to split it into several files, using the same route /games
I tried extending the class, but it doesn't work?
# games.py
from flask import Blueprint
bp = Blueprint('games', __name__, url_prefix='/games')
@bp.route('/')
def index():
...
.
# games_extend.py
from .games import bp
@bp.route('/test')
def test_view():
return "Hi!"
Am I doing something wrong or is there a better way?