I got Blueprint working properly.
App structure:
application.py
users/routes.py
In application.py I register the blueprint:
app.register_blueprint( users, url_prefix = '/users' )
And in users/routes.py I create it:
users = Blueprint( 'users', __name__, template_folder = "usersViews" )
@users.route( '/registration', methods = [ 'GET' ] )
def get_register_user_form( ):
# Code......
What I need to do is add other files into users/ from which I need to use @users.route like in:
users/route2.py
users/route3.py
But this won't work as the blueprint is only created in the original users/routes.py. I'm not sure the proper way to handle this case ? I guess recreating the blueprint in each route file with users = Blueprint( 'users', name, template_folder = "usersViews" ) is not the proper way to do so. So how could I achieve that ?