On 9/22/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> I propose a new helper function in django.core.extensions,
> get_or_404(), which would do this:
>
>     def foo_detail(request, some_lookup):
>         f = get_or_404(foos, some_field__exact=some_lookup)

I've added get_object_or_404 and get_list_or_404 to django/core/extensions.py.

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to