# Path: user_management/api/exceptions.py
# class InvalidExpiredToken(APIException):
#     """Exception to confirm an account."""
#     status_code = status.HTTP_400_BAD_REQUEST
#     default_detail = _('Invalid or expired token.')


from django.conf import settings
from django.contrib.auth import get_user_model
from django.core import signing
from django.utils.translation import ugettext_lazy as _
from rest_framework.exceptions import PermissionDenied
from user_management.api.exceptions import InvalidExpiredToken



class VerifyAccountViewMixin(object):
    """
    Verify a new user's email address.

    Verify a newly created account by checking the `token` in the URL kwargs.
    """
    ok_message = _('Your account has been verified.')

# Path: user_management/api/exceptions.py
# class InvalidExpiredToken(APIException):
#     """Exception to confirm an account."""
#     status_code = status.HTTP_400_BAD_REQUEST
#     default_detail = _('Invalid or expired token.')


# Path: user_management/utils/views.py
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core import signing
from django.utils.translation import ugettext_lazy as _
from rest_framework.exceptions import PermissionDenied
from user_management.api.exceptions import InvalidExpiredToken




class VerifyAccountViewMixin(object):
    """
    Verify a new user's email address.

    Verify a newly created account by checking the `token` in the URL kwargs.
    """
    ok_message = _('Your account has been verified.')

    invalid_exception_class = InvalidExpiredToken