Python Template Engine

Posted by admin
Yaml
  1. Python Template Engine Benchmark
  2. Python Web Template Engines

Python Template Engine Benchmark

% name = 'Bob' # a line of python codeSome plain text in between<%# A block of python codename = name.title.strip%More plain textEmbedded python code follows regular python syntax, but with two additional syntax rules:. Indentation is ignored. You can put as much whitespace in front of statements as you want. This allows you to align your code with the surrounding markup and can greatly improve readability.

Python Web Template Engines

Blocks that are normally indented now have to be closed explicitly with an end keyword.