What is the correct way to access endpoints using get_url() or url()?

27 views
Skip to first unread message

nikos.at....@gmail.com

unread,
Sep 23, 2018, 8:00:12 AM9/23/18
to bottlepy

i'm using Bottle. I have defined several routes with their corresponding view function for example

/log/<page>
/showlogs

What is the correct way to access those routes using get_url? I try to:

get_url( 'log', page=page )
get_url( 'showlogs' )

and the error iam receiving is:

NameError: name 'get_url' is not defined

If i try to use `url' instead i get this error:

bottle.RouteBuildError: ('No route with that name.', 'log') 
bottle.RouteBuildError: ('No route with that name.', 'showlogs')

How am i supposed to access the endpoints?!

Reply all
Reply to author
Forward
0 new messages