serializers: import gettext_lazy; fixes #70

Per Django's warning, ugettext_lazy will be removed in a future version.
This commit is contained in:
Sean Farley 2020-05-19 19:21:11 -07:00
parent 860c350ac9
commit 2a6fb3a873

View File

@ -5,6 +5,9 @@ from django.contrib.auth.tokens import default_token_generator
from django.utils.encoding import force_text
from django.utils.http import urlsafe_base64_decode as uid_decoder
from django.utils.module_loading import import_string
try:
from django.utils.translation import gettext_lazy as _
except ImportError:
from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, serializers
from rest_framework.exceptions import ValidationError