mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Translate Throttled exception messages (#6771)
This commit is contained in:
parent
da06240257
commit
41d5338ba6
|
@ -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