mirror of
https://github.com/jazzband/django-authority.git
synced 2026-05-13 10:03:11 +00:00
Replace force_text with force_str
This commit is contained in:
parent
e38f83aef0
commit
250aafc9dc
1 changed files with 3 additions and 7 deletions
|
|
@ -9,11 +9,7 @@ from django.contrib.admin import actions, helpers
|
|||
from django.contrib.contenttypes.admin import GenericTabularInline
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.exceptions import PermissionDenied
|
||||
|
||||
try:
|
||||
from django.utils.encoding import force_text
|
||||
except ImportError:
|
||||
from django.utils.encoding import force_unicode as force_text
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from authority.models import Permission
|
||||
from authority.widgets import GenericForeignKeyRawIdWidget
|
||||
|
|
@ -100,7 +96,7 @@ def edit_permissions(modeladmin, request, queryset):
|
|||
|
||||
context = {
|
||||
"errors": ActionErrorList(formsets),
|
||||
"title": gettext("Permissions for %s") % force_text(opts.verbose_name_plural),
|
||||
"title": gettext("Permissions for %s") % force_str(opts.verbose_name_plural),
|
||||
"inline_admin_formsets": inline_admin_formsets,
|
||||
"app_label": app_label,
|
||||
"change": True,
|
||||
|
|
@ -115,7 +111,7 @@ def edit_permissions(modeladmin, request, queryset):
|
|||
"show_delete": False,
|
||||
"action_checkbox_name": helpers.ACTION_CHECKBOX_NAME,
|
||||
"queryset": queryset,
|
||||
"object_name": force_text(opts.verbose_name),
|
||||
"object_name": force_str(opts.verbose_name),
|
||||
}
|
||||
template_name = getattr(
|
||||
modeladmin,
|
||||
|
|
|
|||
Loading…
Reference in a new issue