The exception is very definitely being raised by me trying to
distinguish things based on REQUEST_METHOD type. Here's the traceback:
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/django/core/handlers/base.py",
line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/andrew/djprj/helpers/request_handler.py", line 77, in
__call__
raise NoMethodError(request.method)
NoMethodError: The HEAD method is not allowed for this path
----
The relevant code in helpers/request_handler.py is this:
class RestHandler(object):
def __call__(self, request, *args, **kwargs):
method = request.method.upper()
if hasattr(self, method):
return getattr(self, method)(request, *args, **kwargs)
raise NoMethodError(request.method)
class NoMethodError(Exception):
def __init__(self, method):
super(Exception, self).__init__(
"The %s method is not allowed for this path" % method)
---
Graham, are you suggesting that if I receive a HEAD request, I should
behave exactly the same as if I received a GET request? That is, I
should assume Apache / mod_wsgi will take care of translating my
response into one appropriate for a HEAD request?
-- Andrew
On Jul 6, 7:28 pm, Graham Dumpleton <
graham.dumple...@gmail.com>
wrote: