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

url_for and routes defined twice #140

Closed
davidbgk opened this issue Jun 15, 2020 · 2 comments
Closed

url_for and routes defined twice #140

davidbgk opened this issue Jun 15, 2020 · 2 comments
Assignees

Comments

@davidbgk
Copy link
Contributor

Sometimes, you want to define two routes for the same handler, for instance:

@app.route("/url")
@app.route("/old-url")
async def handler():

(Think legacy)

In that case, which route to return with url_for? Maybe only the named one? Maybe a regular redirection for the old route is the correct way to do?

@davidbgk
Copy link
Contributor Author

Another issue related to it: if you the static extension twice, the generated routes will have the same name too.

@davidbgk davidbgk added the bug label Jun 15, 2020
@davidbgk
Copy link
Contributor Author

Fixed in #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants