Python HTML Templating DSL
teacup的Python项目详细描述
Python的HTML模板DSL。
==
一个简单的HTML模板库,使用DSL
迷你语言。我试图将其设计成与茶杯/咖啡杯(https://github.com/goodeggs/teacup)相似的感觉。我还从jamescasbon的template.py脚本(https://gist.github.com/jamescasbon/1461441)中获得了灵感。
还包括用于嵌入标记的md()函数,以及用于输出经过美化的html的选项。
示例用法::
通过
身体:
P:
MD(“这是**测试!**“
with p({“class”:“test”}, id="testme"):
text(“另一个测试”)
a(“单击此处”,href=“https://google.com”)
print(render())
==
一个简单的HTML模板库,使用DSL
迷你语言。我试图将其设计成与茶杯/咖啡杯(https://github.com/goodeggs/teacup)相似的感觉。我还从jamescasbon的template.py脚本(https://gist.github.com/jamescasbon/1461441)中获得了灵感。
还包括用于嵌入标记的md()函数,以及用于输出经过美化的html的选项。
示例用法::
通过
身体:
P:
MD(“这是**测试!**“
with p({“class”:“test”}, id="testme"):
text(“另一个测试”)
a(“单击此处”,href=“https://google.com”)
print(render())