INNER CODE UNIT · Python

select_jinja_autoescape

michaelzhang-ai/Text2Video · venv_vid2vid/lib/python3.7/site-packages/flask/app.py:809

    def select_jinja_autoescape(self, filename):
        """Returns ``True`` if autoescaping should be active for the given
        template name. If no template name is given, returns `True`.

        .. versionadded:: 0.5
        """
        if filename is None:
            return True
        return filename.endswith((".html", ".htm", ".xml", ".xhtml"))

    def update_template_context(self, context):
        """Update the template context with some commonly used variables.
        This injects request, session, config and g into the template
        context as well as everything template context processors want
        to inject.  Note that the as of Flask 0.6, the original values
        in the context will not be overridden if a context processor
        decides to return a value with the same key.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…