Fix comment around importing exception best practices

This commit is contained in:
Bo Lopker 2015-08-07 12:10:22 -07:00
parent 0cbfbc27d8
commit 21e97b67dc

View File

@ -59,11 +59,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