Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread Jacob Kaplan-Moss
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 en

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread James Bennett
On 7/24/06, Simon Willison <[EMAIL PROTECTED]> wrote: > It would be nice if we could catch this and provide a friendly error > message, maybe by having an assertion somewhere that checks that the > view function has returned an object that is an instance (or > subclass) of HttpResponse. That'd pr

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread Simon Willison
On 24 Jul 2006, at 01:17, Jacob Kaplan-Moss wrote: >> Has anybody else seen this error? It's obvious that Http404 doesn't >> have the method, it's just a subclass of Exception. If this is just a >> Django bug, I'll happily post a patch, just want to feel out any >> possible stupidness on my part

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread Afternoon
Haha! You're quite right. I blame my understudy :-). Thanks for your help 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.

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-23 Thread Jacob Kaplan-Moss
On Jul 23, 2006, at 5:52 PM, Afternoon wrote: > Has anybody else seen this error? It's obvious that Http404 doesn't > have the method, it's just a subclass of Exception. If this is just a > Django bug, I'll happily post a patch, just want to feel out any > possible stupidness on my part first :-)

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-23 Thread Afternoon
Looked around the code a bit, the definition of Http404, the old HttpResponseNotFound, the cache and middleware stuff, I can't see how this is supposed to work out at all! The intervening request handling layers expect a proper response object, instead they're getting an exception? --~--~---

AttributeError: class Http404 has no attribute 'has_header'

2006-07-23 Thread Afternoon
File "/Users/ben/Documents/Code/Python/lib_mr/django/utils/cache.py", line 104, in patch_vary_headers if response.has_header('Vary'): AttributeError: class Http404 has no attribute 'has_header' --~--~-~--~~~---~--~~ You received this message