From 136752ca9a87be908f9ec1e398bbd56b0c75222c Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 20 Jun 2006 03:48:31 +0000 Subject: Added 'method' attribute to HttpRequest objects git-svn-id: http://code.djangoproject.com/svn/django/trunk@3164 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/handlers/modpython.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'django/core/handlers/modpython.py') diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index ce7f6f1ad2..5a20ce9f67 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -98,6 +98,9 @@ class ModPythonRequest(http.HttpRequest): self._raw_post_data = self._req.read() return self._raw_post_data + def _get_method(self): + return self.META['REQUEST_METHOD'].upper() + GET = property(_get_get, _set_get) POST = property(_get_post, _set_post) COOKIES = property(_get_cookies, _set_cookies) @@ -105,6 +108,7 @@ class ModPythonRequest(http.HttpRequest): META = property(_get_meta) REQUEST = property(_get_request) raw_post_data = property(_get_raw_post_data) + method = property(_get_method) class ModPythonHandler(BaseHandler): def __call__(self, req): -- cgit v1.3