aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/methods.py
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-02-07 08:23:54 +0000
committertom christie tom@tomchristie.com2011-02-07 08:23:54 +0000
commit027ffed21064b1ec304a1ea559104382313d76f4 (patch)
tree8621c8741d76cc672da207cf314574a4fbd828d1 /djangorestframework/methods.py
parenta8bcb2edc63564522b89b9950ea0882d6b25f24a (diff)
downloaddjango-rest-framework-027ffed21064b1ec304a1ea559104382313d76f4.tar.bz2
Refactor a bunch of stuff into mixins, more tests
Diffstat (limited to 'djangorestframework/methods.py')
-rw-r--r--djangorestframework/methods.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/djangorestframework/methods.py b/djangorestframework/methods.py
index 06a96643..088c563c 100644
--- a/djangorestframework/methods.py
+++ b/djangorestframework/methods.py
@@ -24,12 +24,12 @@ class OverloadedPOSTMethodMixin(MethodMixin):
"""Provide for overloaded POST behaviour."""
"""The name to use for the method override field in the POST form."""
- FORM_PARAM_METHOD = '_method'
+ METHOD_PARAM = '_method'
def determine_method(self, request):
"""Simply return GET, POST etc... as appropriate, allowing for POST overloading
by setting a form field with the requested method name."""
method = request.method.upper()
- if method == 'POST' and self.FORM_PARAM_METHOD and request.POST.has_key(self.FORM_PARAM_METHOD):
- method = request.POST[self.FORM_PARAM_METHOD].upper()
+ if method == 'POST' and self.METHOD_PARAM and request.POST.has_key(self.METHOD_PARAM):
+ method = request.POST[self.METHOD_PARAM].upper()
return method \ No newline at end of file