What are html templating alternatives for Django? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
开发者_JS百科Closed 4 years ago.
Improve this questionPlease note I'm coming from a Ruby & Node.js world and would like to use something concise and not neccessarily complex.
Would be great to use haml but it's not required.
I was looking at Jinja2 but it seems to be a better implementation of roughly the same idea as standard templates which seem IMHO overengineered a bit. If you think this is not the case, I'd like to hear such opinion too.
TIA
Templating in Python lists a bunch.
I think the closest thing you are going to find is something like Brevé
HAML:
#profile
.left.column
#date= print_date
#address= current_user.address
.right.column
#email= current_user.email
#bio= current_user.bio
Brevé
div ( id = 'profile' ) [
div ( _class = 'left column' ) [
div (id = "date") [
today() # Assumes we have a function called `today` registered.
]
div (id = "address") [
current_user.address
]
]
div ( _class = 'right column' ) [
div (id = "email") [
current_user.email
]
div (id = "bio") [
current_user.bio
]
]
]
Breve also has a tool that converts HTML to Breve code.
精彩评论