DR, That explanation helps. Upon another reading, I see that the tutorial says as much regarding reverse(). Yet that function is only demonstrated in the tutorial as a means of redirection, which is why I mistakenly equated it with render_to_response().
Thanks for setting me straight! Tim On Mar 7, 5:43 pm, Daniel Roseman <[email protected]> wrote: > On Mar 7, 7:59 pm,timlash<[email protected]> wrote: > > > I see. Thanks. > > > I've been using render_to_response() without difficulties. Under what > > conditions should I use reverse() vs. render_to_response()? Can they > > be used interchangeably? > > > Thanks again, > > > Tim > > Eh? They do completely different jobs. > > render_to_response, as the name implies, renders a template then > returns an HttpResponse, which you can return as the output of your > view. > > reverse does a very specific job - it looks up a view name against > your URLconf and returns the URL that calls that view. You can use > that URL as the destination for a redirect, send it to your template, > or anything else you like. > > -- > DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

