示例#1
0
文件: views.py 项目: spookey/fnordpad
def stream_template(templatename, **context):
        APP.update_template_context(context)
        template = APP.jinja_env.get_template(templatename)
        rv = template.stream(context)
        rv.enable_buffering(5)      # you might want to buffer up a few items in the template
        return rv