5 ms·
It's been fun watching these features play out in libraries over the last year. I particularly like the idea of TemplateResponse - the earliest implementation
by jbox 16y ago
It's been fun watching these features play out in libraries over the last year.
I particularly like the idea of TemplateResponse - the earliest implementation I saw was in simonw's:
https://github.com/simonw/django-openid/blob/master/django_openid/response.py#L4 https://github.com/simonw/django-openid/blob/master/django_o...
This approach makes template rendering much more flexible!
For example, it would be easy to swap out a template for a mobile one ... or to A/B test a template. Or choose the content type of the output (HTML, JSON etc.)
- simonw 16y agoYeah, I was really pleased to see that they've taken that concept and turned it in to a real, tested, documented feature.