jinja2.nodes.Const.from_untrusted

classmethod Const.from_untrusted(value, lineno=None, environment=None)[source]

Return a const object if the value is representable as constant value in the generated code, otherwise it will raise an Impossible exception.