toastdriven/django-tastypie — pull request #364 by stephenmcd (2012-02-10 00:31:56+00:00)
Title: Added django.http.http404 to the list of exceptions returning 404.

In the cookbook there is an example of overriding Resource.dispatch using Django's get_object_or_404:

http://django-tastypie.readthedocs.org/en/latest/cookbook.html#nested-resources

Django raises a http404 exception in this case, which isn't listed in Resource._handle_500 as one of the exceptions to return a 404 status for, so a 500 status is returned.

This change adds http404 to the exceptions checked for, so that using Django's get_object_or_404 will return a correct http status.

Thanks for the awesome software!