'Return to top level domain with url_for()
I have a page on http://127.0.0.1:5000/, which redirects to http://127.0.0.1:5000/results
in my /results page, I want to include a link that will return me to http://127.0.0.1:5000/. I've tried various things using url_for():
<h2>Or search <a href="{{ url_for(filename='/') }}">something else</a></h2>
<h2>Or search <a href="{{ url_for('static', filename='/') }}">something else</a></h2>
However these throw errors such as TypeError: url_for() missing 1 required positional argument: 'endpoint'
(keep in mind I can't just do href="http://127.0.0.1:5000" because the url might change, and I don't want to have to change it manually
How can I do that? (sorry for noob question)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
