On Sun, Nov 28, 2010 at 11:30 PM, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > Hi Russ -- > > On Sun, Nov 28, 2010 at 1:13 AM, Russell Keith-Magee > <russ...@keith-magee.com> wrote: >> For your consideration, I present a patch to resolve #12815 and >> #12816, adding a TemplateResponse and a render() shortcut. > > Good stuff. > > A couple of things though: > > * I'm really not a fan of "bake()" and ".baked" -- it really feels too > clever a name to me. I know there's a bit of precedent w.r.t. "baked" and > "fried" responses, but I still think the name's just non-obvious. > Especially to people who don't speak English natively. > > Can we just go with something bording like "render()" and ".rendered"?
There is a slight complication -- the current API has a render() method in addition to bake(). bake() only works once; render() can be called (and assigned to render.content) at any time to get rendered content using the current template/context, even if bake() has been called. At one point in the history of the patch, the API had a bake() and force_bake(); I suppose we could use render() and force_render(). > * I think we should deprecate render_to_response() in favor of render(). > render_to_response() is just render(request=None, ...), right? Any > reason to keep both around? There's no particular reason to keep both around, other than the code churn that deprecation would entail. This is something that I have no problem deprecating on the 2.0 schedule, but migrating every use of render_to_response() over the next 18 months/2 releases seems like an extreme measure to enforce on the entire user base when maintaining render_to_response() doesn't take any real effort. Yours Russ Magee %-) -- 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.