On Sat, 2009-01-24 at 18:24 +0100, Viktor Nagy wrote:
>  Hi,
> 
> I would like to provide proper Last-Modified headers, but in general
> my code uses the render_to_response shortcut. As far as I understand
> the code, even though I can add a **kwargs argument to
> render_to_response, it won't get added to my response object.

render_to_response() is an aid, not a crutch. If it doesn't work as you
would like it to, write a similar shortcut that does. The
render_to_response() code is only two lines long, after all.

We have intentionally avoided making it more complex than it is, as it
is such a simple function. So don't tie yourself to thinking that
"render_to_response() should change so that I can continue using it".
Instead, think along the lines of "I need something beyond
render_to_response(), so I'll write my own little helper method." It's
not worth Django handling infinite configurability here, since that
complicates the API for eveyrbody and writing your own method takes so
little time.

Regards,
Malcolm


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

Reply via email to