Tagged: jinja2

Web: Flask and Jinja2

Flask Flask a microframework written in Python that makes it easy to get a simple web application up and running with some features that can be useful in the development process. Install package Flask, create new application.py file with the code and set FLASK_APP=application.py To start server: flask run A route is the part of the URL that determines which page...

0

Jinja2 in Python – Render Config

Jinja2 is a full-featured template engine for Python. The first time I used it with Flask, it comes packaged with the powerful Jinja templating language. But it also could be used for rendering configuration. Jinja templates use: {{ … }} – for variable {% … %} – for expressions or logic (like for loops) Jinja2 also allows for conditional statements: Jinja2...