On 10/12/07, Joe <[EMAIL PROTECTED]> wrote: > > I don't know how many times I've wanted to to this: > > return render_to_response("template.html", > {"object":Model.objects.get(parameter=value)}) > > instead of that exception handling.
You want get_object_or_404. http://www.djangoproject.com/documentation/db-api/#get-object-or-404 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---