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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request.url_for method #256

Open
RobertoPrevato opened this issue Apr 28, 2022 · 1 comment
Open

Add request.url_for method #256

RobertoPrevato opened this issue Apr 28, 2022 · 1 comment

Comments

@RobertoPrevato
Copy link
Member

馃殌 Feature Request

Add a request.url_for method (including helper for Jinja2), supporting an optional name?

Maybe:

def url_for(path: str, *, name: str | None = None):
    ...

Like in Starlette (ref):

Mount("/users", name="users", routes=[
        Route("/", user, name="user_list"),
        Route("/{username}", user, name="user_detail")
    ])
@virajkanwade
Copy link

We also need Mount support for subrouting.

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

2 participants