from rest_framework import status
import rest_framework.exceptions


class ValidationError(rest_framework.exceptions.ValidationError):
    code = ''

    def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST):
        super(ValidationError, self).__init__(detail)
        self.status_code = status_code
        self.code = code

from rest_framework import status
import rest_framework.exceptions


class ValidationError(rest_framework.exceptions.APIException):
    code = ''

    def __init__(self, detail, code=None, status_code=status.HTTP_400_BAD_REQUEST):
        super(ValidationError, self).__init__(detail)
        self.code = code
        self.status_code = status_code

Fix Validation import error in older DRF.
Fix Validation import error in older DRF.
