Python jinja2.environment.TemplateModule() Examples

The following are 17 code examples of jinja2.environment.TemplateModule(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module jinja2.environment , or try the search function .
Example #1
Source File: asyncsupport.py    From Building-Recommendation-Systems-with-Python with MIT License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #2
Source File: asyncsupport.py    From android_universal with MIT License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #3
Source File: asyncsupport.py    From Carnets with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #4
Source File: asyncsupport.py    From EDCOP with Apache License 2.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #5
Source File: asyncsupport.py    From odoo13-x64 with GNU General Public License v3.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #6
Source File: asyncsupport.py    From PhonePi_SampleServer with MIT License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #7
Source File: asyncsupport.py    From planespotter with MIT License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #8
Source File: asyncsupport.py    From cadquery-freecad-module with GNU Lesser General Public License v3.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #9
Source File: asyncsupport.py    From scylla with Apache License 2.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #10
Source File: asyncsupport.py    From misp42splunk with GNU Lesser General Public License v3.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #11
Source File: asyncsupport.py    From Building-Recommendation-Systems-with-Python with MIT License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #12
Source File: asyncsupport.py    From pySINDy with MIT License 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #13
Source File: asyncsupport.py    From OpenXR-SDK-Source with Apache License 2.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #14
Source File: asyncsupport.py    From RSSNewsGAE with Apache License 2.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #15
Source File: asyncsupport.py    From recruit with Apache License 2.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #16
Source File: asyncsupport.py    From recruit with Apache License 2.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream) 
Example #17
Source File: asyncsupport.py    From misp42splunk with GNU Lesser General Public License v3.0 5 votes vote down vote up
def make_module_async(self, vars=None, shared=False, locals=None):
    context = self.new_context(vars, shared, locals)
    body_stream = []
    async for item in self.root_render_func(context):
        body_stream.append(item)
    return TemplateModule(self, context, body_stream)