diff --git a/opentech/apply/stream_forms/blocks.py b/opentech/apply/stream_forms/blocks.py index d8a808422f4a42dbaea627bfcaff9c742e9ae150..09b37619c0924ab73539e4166cd6d7eb260ed05a 100644 --- a/opentech/apply/stream_forms/blocks.py +++ b/opentech/apply/stream_forms/blocks.py @@ -9,7 +9,7 @@ from django.core.validators import FileExtensionValidator from django.db.models import BLANK_CHOICE_DASH from django.forms.widgets import ClearableFileInput from django.utils.dateparse import parse_datetime -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ from unidecode import unidecode @@ -33,7 +33,7 @@ class FormFieldBlock(StructBlock): template = 'stream_forms/render_field.html' def get_slug(self, struct_value): - return force_text(slugify(unidecode(struct_value['field_label']))) + return force_str(slugify(unidecode(struct_value['field_label']))) def get_field_class(self, struct_value): return self.field_class diff --git a/opentech/apply/users/views.py b/opentech/apply/users/views.py index 88014382878eb3960ab935f250aa7ad7cff18855..91cc1102454fa49e237f537bd1da298db233ce67 100644 --- a/opentech/apply/users/views.py +++ b/opentech/apply/users/views.py @@ -11,7 +11,7 @@ from django.shortcuts import redirect, render, resolve_url from django.template.response import TemplateResponse from django.urls import reverse_lazy from django.utils.decorators import method_decorator -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.http import is_safe_url, urlsafe_base64_decode from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_protect @@ -149,7 +149,7 @@ class ActivationView(TemplateView): """ try: user = User.objects.get(**{ - 'pk': force_text(urlsafe_base64_decode(uidb64)) + 'pk': force_str(urlsafe_base64_decode(uidb64)) }) return user except (TypeError, ValueError, OverflowError, User.DoesNotExist):