Closed mbr closed 10 years ago
The first commit is a mild improvement, the second a bit more drastic. I'd love some feedback on this, I think both are a cleaner approach in the long run that what is done currently.
I'm okay with putting this in another library as well though.
These were supposed to be two pull requests, but github grouped them unfortunately. Oh well....
Added the @socket wrapper. Github keeps merging all my pull requests, so I'll have to deal with that for now I guess.
GitHub will "merge" the pull requests if you update the source of the pull request (essentially your merging them in your master branch and GitHub is just using that).
Do each PR from a different branch if you don't want them to be lumped together.
I was implementing the same exact thing as @mbr did in the first PR. I'll try the second approach using the LocalProxy
from Werkzeug
and see how it goes.
Very nice! This is a pretty massive breaking change, though. I'll need to think about it. I definitely prefer the old api as well. Maybe there's a way to allow both ways to be used.
Any update on this? The way the routes are currently done means that url_for() doesn't work.
as it stands now is there some other way to do variable routing?
I'd like to have this as well. It's definitely a unintuitive that path parameters don't work.
Great improvement! Please accept the pull request.
+1
I am going to play around with mbr's code and see if it works for me.
In my search of github, I also found this code which uses flask.Blueprint and socketio (I'm not sure if it works):
+1 here too, looking for "flask" variables in url routes as well
Edit: PR #18 works practically right out of the box without need to mess with LocalProxy, + no breaking changes.
Going to go with #18 :)
...ers.
This allows the use of parameters in URLs, for example a route of
properly gets passed the channel name.