liquid.tags.wild
module
liquid.tags.wild
Provides tags for wild mode
Functions
addfilter(env,token,parser)(Node) — The addfilter tag {% addfilter name ... %} ... {% endaddfilter %}</>from_(env,token,parser)(Node) — The from_ tag {% from_ ... %}</>import_(env,token,parser)(Node) — The import_ tag {% import_ ... %}</>python(env,token,parser)(Node) — The python tag</>
function
liquid.tags.wild.python(env, token, parser)
The python tag
{% python %} ... {% endpython %} or {% python ... %}
The globals from the enviornment will be used to evaluate the code It also affect the globals from the environment
Parameters
env(Environment) — The environmenttoken(Token) — The token matches the tag nameparser(Parser) — The parser
Returns (Node)
The parsed node
function
liquid.tags.wild.import_(env, token, parser)
The import_ tag {% import_ ... %}
Name it 'import_' so the 'import' tag from jinja can still work
Parameters
env(Environment) — The environmenttoken(Token) — The token matches tag nameparser(Parser) — The parser
Returns (Node)
The parsed node
function
liquid.tags.wild.from_(env, token, parser)
The from_ tag {% from_ ... %}
Name it 'from_' so the 'from_' tag from jinja can still work
Parameters
env(Environment) — The environmenttoken(Token) — The token matches tag nameparser(Parser) — The parser
Returns (Node)
The parsed node
function
liquid.tags.wild.addfilter(env, token, parser)
The addfilter tag {% addfilter name ... %} ... {% endaddfilter %}
This allows one to use the python code inside the body to add a filter or replace an existing filter
Parameters
env(Environment) — The environmenttoken(Token) — The token matches tag nameparser(Parser) — The parser
Returns (Node)
The parsed node