On Jul 24, 2006, at 6:03 AM, James Bennett wrote:
> That'd probably be a good idea; I remember being somewhat befuddled
> when I wrote up my "how Django processes a request" at not being able
> to find anything that checked whether the return value from the view
> (or middleware, if that's what ends up returning) was an HttpResponse.

I think that's because the return value doesn't strictly have to be  
an HttpResponse -- it just has to behave like one (hooray for duck  
typing!).  Checking for HttpResponse instances would be most un- 
Pythonic, so it should be avoided.

Now, a sensible error message -- "Looks like you tried to return a  
HTTP exception object; you probably meant to raise it" -- would rock.

Jacob

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to