I'm in a Mako template, and I want to know what the current controller and action is (of the current page). How can I do this? I tried c.controller and c.action, but it didn't work. I also listed the keys of the context object but didn't find it.
As a workaround, I've been setting c.controller and c.action from within each controller method, but I know there must be a better way.
class MainController(BaseController):
def index(self):
c.controller, c.action = 'main', 'index'
return render("/main.html")