Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
jLM.Template Namespace Reference

Functions

 j2render (fname, ctx)
 displayj2html (fname, ctx)

Variables

 _j2

Detailed Description

Templating engine tools

Function Documentation

◆ displayj2html()

jLM.Template.displayj2html ( fname,
ctx )
Renders an HTML template and displays in Jupyter notebook

Args:
    fname (str):
        template file in the "templates" directory
    ctx (dict):
        context dictionary
Here is the call graph for this function:

◆ j2render()

jLM.Template.j2render ( fname,
ctx )
Renders a template given a context dictionary

Args:
    fname (str):
        template file in the "templates" directory
    ctx (dict):
        context dictionary

Returns:
    str: Rendered template
Here is the caller graph for this function:

Variable Documentation

◆ _j2

jLM.Template._j2
protected
Initial value:
1= jinja2.Environment(trim_blocks=True,
2 lstrip_blocks=True,
3 loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__),"templates")))