This commit is contained in:
Bo Lopker 2017-04-25 07:07:48 +00:00 committed by GitHub
commit 056b6003c7

View File

@ -112,11 +112,11 @@ class APIException(Exception):
# The recommended style for using `ValidationError` is to keep it namespaced
# under `serializers`, in order to minimize potential confusion with Django's
# under `exceptions`, in order to minimize potential confusion with Django's
# built in `ValidationError`. For example:
#
# from rest_framework import serializers
# raise serializers.ValidationError('Value was invalid')
# from rest_framework import exceptions
# raise exceptions.ValidationError('Value was invalid')
class ValidationError(APIException):
status_code = status.HTTP_400_BAD_REQUEST