TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Can anyone rec a simple templating language implemented in py and js?

2 点作者 kortina将近 15 年前
The goal is to be able to present json data as html/ui, and do the rendering both on the server or client side. Most of the time the server app will generate the html when the page first loads, but when a list gets updated via user interaction with javascript, I don't want to have custom javascript duplicating the rendering that happens in my python templates. I have been looking at JSON-template (http://bit.ly/aO27UM) but would love to know if anyone has any recs. Also looked at Google Closure templates, but they are implemented in server side java, not python. Anyone have any good solutions they recommend?

2 条评论

jlindley将近 15 年前
Mustache: <a href="http://mustache.github.com/" rel="nofollow">http://mustache.github.com/</a><p>For Python: <a href="http://github.com/defunkt/pystache" rel="nofollow">http://github.com/defunkt/pystache</a><p>For Javascript: <a href="http://github.com/janl/mustache.js" rel="nofollow">http://github.com/janl/mustache.js</a><p>Syntax docs: <a href="http://mustache.github.com/mustache.5.html" rel="nofollow">http://mustache.github.com/mustache.5.html</a>
评论 #1436729 未加载
DanielStraight将近 15 年前
This might be worth looking into:<p><a href="http://beebole.com/pure/" rel="nofollow">http://beebole.com/pure/</a><p>I haven't used it in production, but I've found it interesting nonetheless.
评论 #1430189 未加载