I don't like the django templates, can i use kid ?
if can, how can i do then?
thanks.
--
welcome: http://www.webwork.cn
> I don't like the django templates, can i use kid ?
> if can, how can i do then?
Yes you can. Here's an example:
from django.http import HttpResponse
import kid
def index(request):
# Set up any variables you might want to use
template = kid.Template(
file='/path/to/template.kid',
foo='Bar', baz='bling'
)
return HttpResponse(template.serialize())
That's it! Django is designed to completely decouple HTML generation
etc from the views, so it's very easy to use whatever method you want
to generate the content to be sent back in the HttpResponse.
Hope that helps,
Simon