Closed winster closed 7 years ago
@winster If you've figured out the root of the problem, please, do not delete bodies of issues even if they are not related to the library itself.
Project contributors receive original issue reports on emails, so issue bodies can be restored.
Other people may face problems similar to yours and any help can save their time. However, deleted issue messages can confuse everyone.
This is a general advise on collaborating with others.
Thanks
@oblalex sorry for that. I deleted this because, I didn't notice the blueprint sample in README. You may please restore the body. I will update my fix here.
This is how I fixed it as per the sample given in README.
in init.py put this code
from router import router, ws
app.register_blueprint(router)
sockets = Sockets(app)
sockets.register_blueprint(ws)
and in router.py put this code
router = Blueprint('router', __name__)
ws = Blueprint('ws', __name__)
@winster done, thanks
In my
router.py
, when I tried to create sockets object, it failed with following errorThis is how I tried to create sockets object.
Since above statements didnt work, I also tried to put the following code in
__init.py__
:How to fix this?