Closed writeson closed 5 years ago
register_blueprint()
actually. It's in the application factory function: https://github.com/miguelgrinberg/Flask-SocketIO-Chat/blob/master/app/__init__.py#L14.Thanks for the clarification, I don't know how I missed the register_blueprint in the create_app() function, sorry for D'OH moment on my part.
Also, thanks also for the clarification that Blueprints isn't used with Flask-SocketIO. Based on the structure of the app folders I was mistakenly looking for a connection there.
No problem. I could see how this can be a bit confusing. Maybe I should have placed the events.py
module outside of the main
package so that it is more clear that it is not part of the blueprint. As things are, the main
package contains both the blueprint and the Socket.IO stuff.
Hi Miguel,
I have a couple of questions about this example:
app.register_blueprint(...)
. I normally have this in my main entry point after I've gotten an 'app' instance. Is this unnecessary? I wanted to understand this better.Thanks in advance for your help! Doug