On Sat, May 3, 2008 at 8:40 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>  Was looking into using javascript templates for client side html
>  creation but everything was so bloated until I found this:
>  http://www.devhd.com/item0002.htm. It does all the heavy lifting on
>  the server and generates javascript functions that take a context
>  parameter. You can then simply include them in your html document and
>  call them with data on the client.
>  Only thing is I don't want our HTML people to have to learn a new
>  template language. So I was thinking why not extend
>  django.template.Template, either add a new render_js method or an
>  extra parameter to render? I could then create a generic view that
>  takes a template name as a parameter and returns the output of the
>  render_js method on that template.

The Dojo javascript toolkit has support for Django templates. You can
specify a context which is rendered into HTML via django templates.
Tags/filters all apply, just like server side. And it easily acts as a
renderer for datasets delivered via JSON/XML.

http://dojotoolkit.org/book/dojo-book-0-9/part-5-dojox/dojox-dtl

Rob :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to