Calling "url_for" in a Jinja2 template results in NoMatchFound #2834
Unanswered
EntangledLabs
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am writing a web app in Starlette using Jinja2 templates. While writing a custom token auth system, I stumbled across a NoMatchFound error.
So, I tried to figure out why exactly it isn't working. In a lifespan manager, I printed out each route and its associated url_path_for like so:
The following is the output:
So far, so good.
I then called url_path_for another time, except directly on the app's router object:
This is the resulting stack trace:
As far as I can tell, I should be getting the appropriate path. Is there something I'm doing wrong here? Or is this an issue with Starlete?
Beta Was this translation helpful? Give feedback.
All reactions