Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic add_url_rule alternative to @route decorator? #65

Closed
snarfed opened this issue Aug 8, 2023 · 1 comment
Closed

dynamic add_url_rule alternative to @route decorator? #65

snarfed opened this issue Aug 8, 2023 · 1 comment

Comments

@snarfed
Copy link

snarfed commented Aug 8, 2023

Hi! First off, thank you for building and maintaining flask-sock, and for all your other websocket work. It's great!

I'm adding websockets to a Flask app that needs to register its routes dynamically. I'm using Flask.add_url to do this for normal HTTP handlers, which works fine, but it looks like flask-sock currently only has the @route decorator. Any thoughts on how I could register routes dynamically with flask-sock?

Thanks in advance!

@snarfed
Copy link
Author

snarfed commented Aug 9, 2023

Ah, looks like I can just call the decorator manually, eg sock.route('/path')(fn). OK! Might be worth adding to the docs, low priority.

@snarfed snarfed closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant