What of instead of the standard Django template rendering model which is server side, there were a library that allowed something that looked 开发者_C百科like a Django template to be rendered with JavaScript in the client's browser? The variables could be filled in by getting a JSON blob from the server and rendering the template would be done entirely on the client side.
Does a library like this already exist?
As I understand it, GWT sort of does this, but behind the scenes and with a ton of programmer overhead.
I think you may be thinking of the recently announced jQuery template plugins. There are of course other solutions out there, this has gotten the most press lately, with a similar syntax to what you describe.
Google Closure has a template library, there is TrimPath, and there is a long list of answers over here.
you probably think of mustache, but you can also check pure templates
精彩评论