README.rst
1=========================
2Mako Templates for Python
3=========================
4
5Mako is a template library written in Python. It provides a familiar, non-XML
6syntax which compiles into Python modules for maximum performance. Mako's
7syntax and API borrows from the best ideas of many others, including Django
8templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
9Python (i.e. Python Server Page) language, which refines the familiar ideas
10of componentized layout and inheritance to produce one of the most
11straightforward and flexible models available, while also maintaining close
12ties to Python calling and scoping semantics.
13
14Nutshell
15========
16
17::
18
19 <%inherit file="base.html"/>
20 <%
21 rows = [[v for v in range(0,10)] for row in range(0,10)]
22 %>
23 <table>
24 % for row in rows:
25 ${makerow(row)}
26 % endfor
27 </table>
28
29 <%def name="makerow(row)">
30 <tr>
31 % for name in row:
32 <td>${name}</td>\
33 % endfor
34 </tr>
35 </%def>
36
37Philosophy
38===========
39
40Python is a great scripting language. Don't reinvent the wheel...your templates can handle it !
41
42Documentation
43==============
44
45See documentation for Mako at https://docs.makotemplates.org/en/latest/
46
47License
48========
49
50Mako is licensed under an MIT-style license (see LICENSE).
51Other incorporated projects may be licensed under different licenses.
52All licenses allow for non-commercial and commercial use.
53