On 12/01/2010 01:03 PM, Russell Keith-Magee wrote:
I'd argue it doesn't simplify anything. It saves you a grand total of
10 characters (plus a couple more on import), but at the cost of the
added complexity of having two ways of doing *exactly* the same thing.
There is also a loss of explicitness -- there's no doubting what
TemplateResponse will return.

On the other hand, there *is* value in adding a render() shortcut --
because there will be a subset of cases where a TemplateResponse isn't
needed, but a HttpResponse with a RequestContext is.

I'd argue :-) that these cases would be quite rare (in fact I can't even imagine one). And it'd be pity to use such delicious shortcut as 'render()' for the rare case. Especially if we would recommend it as the default way of returning responses from users' views because then almost nobody would use TemplateResponse thus defeating its value altogether.

I understand why you don't like `render = TemplateResponse` but I think it's a minimal disturbance given the value that it provides.

Anyway I believe everyone here has expressed their points of view completely so now it's a judgement call for a committer.

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

Reply via email to