I have a method like so:
def index(self):
title = "test"
return render("index.html", title=title)
Where render
is a function that automatically renders the given template file with the rest of the variables passed in as it's context. In this case, I'm passing title
in as a variable in the context. This is a little redundant for me. Is there any way I can automatically pick up all variables defined in the index
method and pass them all as part of the context to Mako?