How to remove jinja2? python google engine

How to remove jinja2?

I use webtest for unit testing, but for now it only takes me when using templates with the Google engine.

The only related information I found was to remove the template variables passed to the jinja2 template from the webapp2 request handler

However, it was difficult for me to digest.

There is no information on the Internet about this.

A snippet of my code in one of my handlers:

template_values = { "message": "Ello Mate", "errors": self.error_message, "stats" : self.statuses } template = JINJA_ENVIRONMENT.get_template('index.html') self.response.out.write(template.render(template_values)) 

Is there a good way to check template values ​​without printing out the answer?

+6
source share
1 answer

Adam is right; You can scoff at it and it can satisfy your needs. In addition, this post contains information on how to make Jinja2 work without laughing. You can then use HTMLParser to find template_values in the HTML response (give them a unique identifier for the html elements to make this easier).

0
source

All Articles