Merge pull request #72 from seanfarley/smf/django3-warnings

serializers: import gettext_lazy
This commit is contained in:
Michael 2020-05-22 20:54:19 -05:00 committed by GitHub
commit 02c9242e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,10 @@ from django.contrib.auth.tokens import default_token_generator
from django.utils.encoding import force_text from django.utils.encoding import force_text
from django.utils.http import urlsafe_base64_decode as uid_decoder from django.utils.http import urlsafe_base64_decode as uid_decoder
from django.utils.module_loading import import_string from django.utils.module_loading import import_string
from django.utils.translation import ugettext_lazy as _ 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 import exceptions, serializers
from rest_framework.exceptions import ValidationError from rest_framework.exceptions import ValidationError