We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7abeb81 commit 6816c41Copy full SHA for 6816c41
rest_framework_sso/models.py
@@ -6,7 +6,12 @@
6
7
from django.conf import settings
8
from django.db import models
9
-from django.utils.encoding import python_2_unicode_compatible
+
10
+try:
11
+ from django.utils.encoding import python_2_unicode_compatible as smart_text
12
+except ImportError:
13
+ from django.utils.encoding import smart_text
14
15
from django.utils.translation import ugettext_lazy as _
16
17
# Prior to Django 1.5, the AUTH_USER_MODEL setting does not exist.
@@ -22,7 +27,7 @@
22
27
AUTH_USER_MODEL = getattr(settings, "AUTH_USER_MODEL", "auth.User")
23
28
24
29
25
-@python_2_unicode_compatible
30
+@smart_text
26
31
class SessionToken(models.Model):
32
"""
33
The default session token model.
0 commit comments