HamlPy 0.80.3
HamlPy is a tool for Django developers who want to use a HAML like syntax for their templates. HamlPy is not a template engine in itself but simply a compiler which will convert HamlPy files into templates that Django can understand.
But wait, what is HAML? HAML is an incredible template engine written in Ruby used a lot in the Rails community. You can read more about it here
Syntax
Almost all of the XHTML syntax of HAML is preserved.
#profile
.left.column
#date 2010/02/18
#address Toronto, ON
.right.column
#bio Jesse Miller
turns into..
< div id='profile' >
< div class='left column' >
< div id='date' >2010/02/18< /div >
< div id='address' >Toronto, ON< /div >
< /div >
< div class='right column' >
< div id='bio' >Jesse Miller< /div >
< /div >
< /div >
The main difference is instead of interpretting Ruby, or even Python we instead can create Django Tags and Variables
%ul#atheletes
- for athelete in athelete_list
%li.athelete= athelete.name
- endfor
turns into..
< ul id='atheletes' >
{% for athelete in athelete_list %}
< li class='athelete' >{{ athelete.name }}< /li >
{% endfor %}
< /ul >
Product's homepage
Requirements:
Ссылка: http://pypi.pyt..s/source/h/hamlpy/hamlpy-0.80.3.tar.gz#md5=9820ebecaef6126b29c84fbe1eaa6e34
Новые:
|
Рейтинг за сегодня::
|
Похожие:
|