aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/views.py')
-rw-r--r--rest_framework/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/views.py b/rest_framework/views.py
index a2668f2c..23df3443 100644
--- a/rest_framework/views.py
+++ b/rest_framework/views.py
@@ -31,6 +31,7 @@ def get_view_name(view_cls, suffix=None):
return name
+
def get_view_description(view_cls, html=False):
"""
Given a view class, return a textual description to represent the view.
@@ -61,6 +62,7 @@ def exception_handler(exc):
headers['WWW-Authenticate'] = exc.auth_header
if getattr(exc, 'wait', None):
headers['X-Throttle-Wait-Seconds'] = '%d' % exc.wait
+ headers['Retry-After'] = '%d' % exc.wait
return Response({'detail': exc.detail},
status=exc.status_code,
@@ -119,7 +121,6 @@ class APIView(View):
headers['Vary'] = 'Accept'
return headers
-
def http_method_not_allowed(self, request, *args, **kwargs):
"""
If `request.method` does not correspond to a handler method,