Back to index

moin  1.9.0~rc2
utils.py
Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 """
00003     werkzeug.debug.utils
00004     ~~~~~~~~~~~~~~~~~~~~
00005 
00006     Various other utilities.
00007 
00008     :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
00009     :license: BSD.
00010 """
00011 from os.path import join, dirname
00012 from werkzeug.templates import Template
00013 
00014 
00015 def get_template(filename):
00016     return Template.from_file(join(dirname(__file__), 'templates', filename))
00017 
00018 
00019 def render_template(template_filename, **context):
00020     return get_template(template_filename).render(**context)