Skip to content

Instantly share code, notes, and snippets.

Created March 23, 2013 02:33
What would you like to do?
def render(*args, **kwargs):
import inspect
call_frame = inspect.getouterframes(inspect.currentframe(), 2)
template = jinja2.get_template('{}.html'.format(call_frame[1][3]))
return template.render(*args, **kwargs)
def index():
entries = db.Query(Entry).order('-published').fetch(limit=25)
return render(entries=entries)
def archive():
return render()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment