-
Notifications
You must be signed in to change notification settings - Fork 322
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 generation #24
Comments
Copying my comment from internals: Let’s say you have the following routes:
and imagine you want to redirect the user after a POST on the checkout route to its order page with the newly created order ID. In Django you would redirect to the URL given by reverse("order-details", kwargs={'id': order.id}). This requires 2 things (well 3, I’ll expand on the last one a bit later):
The last point that would be nice, providing we have named routes is namespaces. It has been mentioned before as subrouters providing some routes. If I do The Django docs for that bit are in https://docs.djangoproject.com/en/2.1/ref/urlresolvers/#reverse |
These are just some thoughts mentioned during the issue triage:
For now, me and @aturon will be doing a survey of the larger web ecosystem to see how this problem is solved and then outline a general approach for tide. |
Note from triage: we're not sure this necessarily matches well with Rust. We're not sure how to proceed with this and how useful this is, so making a decision to close this for now. |
We need a story for generating URLs in code, given values for various parameters. One possibility would be to use named routes, like Actix does.
Let's discuss possible designs here, before implementing.
The text was updated successfully, but these errors were encountered: