SimpleTemplate.defaults['url'] = lambda : request.url
SimpleTemplate.defaults['fullpath'] = lambda : request.fullpath
SimpleTemplate.defaults['sorted'] = sorted
Include variables in template context on every page with Bottle.py