Skip to content

Commit

Permalink
Merge pull request #153 from uri-rodberg/uri_main_branch_2021-11-23_a
Browse files Browse the repository at this point in the history
Replaced force_text with force_str (deprecated).
  • Loading branch information
dfunckt authored Nov 23, 2021
2 parents a9bf36f + 017eb79 commit 81a3cc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/contrib/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import FieldError, ImproperlyConfigured, PermissionDenied
from django.shortcuts import get_object_or_404
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from django.views.generic import CreateView, DeleteView, DetailView, UpdateView

# These are made available for convenience, as well as for use in Django
Expand Down Expand Up @@ -243,5 +243,5 @@ def _redirect_to_login(request, view_name, login_url, redirect_field_name):
'the "login_url" argument to the "permission_required" '
"decorator or configure settings.LOGIN_URL".format(view_name)
)
redirect_url = force_text(redirect_url)
redirect_url = force_str(redirect_url)
return redirect_to_login(request.get_full_path(), redirect_url, redirect_field_name)

0 comments on commit 81a3cc4

Please sign in to comment.