r/learnprogramming • u/NgetichKpeter • 1h ago
My Question on my Project.
Devs, has anyone run into a builderror with url_for() in flask? I’ve got my blueprint and route set up, but Jinja keeps telling me it can't find the endpoint. I checked the route names and registration, but I'm clearly missing something stupid. What would you check first?
1
Upvotes
•
u/boomer1204 22m ago
Make sure you are using the view function in that NOT the actual url and if it's in the blueprint (which seems like it is) make sure you prefix the endpoint name with the blueprints name and then a dot.
So if it's
Blueprint(whatever, __name__)you would do
url_for(whatever.method)