wijjit.tags.input.SliderExtension

class wijjit.tags.input.SliderExtension(environment)[source]

Jinja2 extension for {% slider %} tag.

Syntax:

{% slider id="volume" min=0 max=100 value=50 %}{% endslider %}
{% slider id="opacity" min=0.0 max=1.0 step=0.1 float_mode=True %}{% endslider %}
{% slider id="brightness" label="Brightness" width=30 %}{% endslider %}
Parameters:

environment (Environment)

__init__(environment)
Parameters:

environment (Environment)

Return type:

None

Methods

__init__(environment)

attr(name[, lineno])

Return an attribute node for the current extension.

bind(environment)

Create a copy of this extension bound to another environment.

call_method(name[, args, kwargs, dyn_args, ...])

Call a method of the extension.

filter_stream(stream)

It's passed a TokenStream that can be used to filter tokens returned.

parse(parser)

Parse the slider tag.

preprocess(source, name[, filename])

This method is called before the actual lexing and can be used to preprocess the source.

Attributes

identifier

priority

the priority of that extension.

tags

if this extension parses this is the list of tags it's listening to.

tags: t.Set[str] = {'slider'}

if this extension parses this is the list of tags it’s listening to.

parse(parser)[source]

Parse the slider tag.

Parameters:

parser (Parser)

Return type:

Node

identifier: t.ClassVar[str] = 'wijjit.tags.input.SliderExtension'