The brackets depend on the template engine you use, but request.route_url('home')this is the Python code that you need inside.
For example, in the file of the desired template:
- jinja2 β
{{ request.route_url('home') }} - mako / chameleon β
${ request.route_url('home') }
If your route definition includes pattern matching, for example config.add_route('sometestpage', '/test/{pagename}'), you should dorequest.route_url('sometestpage', pagename='myfavoritepage')
source
share