mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
Translate Throttled exception messages
This commit is contained in:
parent
3242adf058
commit
414f109e58
|
@ -219,8 +219,8 @@ class UnsupportedMediaType(APIException):
|
||||||
class Throttled(APIException):
|
class Throttled(APIException):
|
||||||
status_code = status.HTTP_429_TOO_MANY_REQUESTS
|
status_code = status.HTTP_429_TOO_MANY_REQUESTS
|
||||||
default_detail = _('Request was throttled.')
|
default_detail = _('Request was throttled.')
|
||||||
extra_detail_singular = 'Expected available in {wait} second.'
|
extra_detail_singular = _('Expected available in {wait} second.')
|
||||||
extra_detail_plural = 'Expected available in {wait} seconds.'
|
extra_detail_plural = _('Expected available in {wait} seconds.')
|
||||||
default_code = 'throttled'
|
default_code = 'throttled'
|
||||||
|
|
||||||
def __init__(self, wait=None, detail=None, code=None):
|
def __init__(self, wait=None, detail=None, code=None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user