-
Notifications
You must be signed in to change notification settings - Fork 8
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
stacking route annotations #10
Comments
This should work, as long as you give each route a unique endpoint name. Reading more about this, in the upstream docs it suggests what you're doing should be working. Personally, that syntax not only looks awful but is also quite un-intuitive. I would much rather have end-user code be able to write this:
And then behind the scenes, we do what needs to be done for it to work with Werkzeug (namely, registering two routes with Flask). I think that code should end up living in |
@chriamue I just pushed a fix to master that hopefully implements support for multiple routes with the same endpoint name on view functions/methods. Can you give it a shot? I didn't add any magic (yet) so for now, you need to continue using the multiple routes (one with default parameter, the other with the parameter as part of the url rule) |
Hi thank you for your quick reply. It seems I'm getting an assertion error now.
|
Hrm yep, not sure how I didn't run into that before... anyway, fix pushed to master |
Works now, thank you for that. |
Hi, a single route annotation works, tried both,
but stacking route annotations, only first works.
The text was updated successfully, but these errors were encountered: