aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/exceptions.py
diff options
context:
space:
mode:
authorTom Christie2014-11-13 22:16:53 +0000
committerTom Christie2014-11-13 22:16:53 +0000
commitcb672a0ecbc2b089370583884994dbd5f2b84acc (patch)
tree31794263d2c052923e3258bed86955bedd7f161b /rest_framework/exceptions.py
parent992330055eeb5d787ddd7d62dfc9121a2256fd9b (diff)
parent03310cc33ae800a36f17a421c8114e0e6616ccb6 (diff)
downloaddjango-rest-framework-cb672a0ecbc2b089370583884994dbd5f2b84acc.tar.bz2
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Diffstat (limited to 'rest_framework/exceptions.py')
-rw-r--r--rest_framework/exceptions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py
index 388d3dee..0b06d6e6 100644
--- a/rest_framework/exceptions.py
+++ b/rest_framework/exceptions.py
@@ -70,7 +70,7 @@ class MethodNotAllowed(APIException):
default_detail = "Method '%s' not allowed."
def __init__(self, method, detail=None):
- self.detail = (detail or self.default_detail) % method
+ self.detail = detail or (self.default_detail % method)
class NotAcceptable(APIException):
@@ -87,7 +87,7 @@ class UnsupportedMediaType(APIException):
default_detail = "Unsupported media type '%s' in request."
def __init__(self, media_type, detail=None):
- self.detail = (detail or self.default_detail) % media_type
+ self.detail = detail or (self.default_detail % media_type)
class Throttled(APIException):