did you simply try the following?
@bottle.get("/py-admin")
@bottle.get("/py-admin/")
@bottle.get("/py-admin/<pagename>")
def py_admin(pagename=None):
# your code…
that's actually one of the examples of the tutorial:
which is the way you go, if really you "prefer to not create different path roots"
but if your code really looks like your short example, then instead of:
@bottle.get("/py-admin/<pagename>")
def py_admin(pagename=None):
if pagename == "download":
do sth
return .....
elif pagename == "update":
do sth else
return .......
return .....
I really think you should consider doing:
@bottle.get("/py-admin")
@bottle.get("/py-admin/")
def py_admin():
# … do something
return ……
@bottle.get("/py-admin/download")
@bottle.get("/py-admin/download/")
def py_admin_download():
# … do something
return ……
@bottle.get("/py-admin/update")
@bottle.get("/py-admin/update/")
def py_admin_update():
# … do something
return ……
but in the end it's really up to you, and it really depends on your code.
HTH