List all the attributes to be rendered directly from template
        source

        :param template_source: the template source (usually represents the
            template content in string format)
        :return: a :class:`set` contains all the needed attributes
        :rtype: set

def listFieldsFromSource(self, template_source):
        """List all the attributes to be rendered directly from template
        source

        :param template_source: the template source (usually represents the
            template content in string format)
        :return: a :class:`set` contains all the needed attributes
        :rtype: set
        """

        ast = self.environment.parse(template_source)
        return jinja2.meta.find_undeclared_variables(ast)