0001-python3-deprecate-django.utils.encoding.smart_unicod.patch
src/authentic2/idp/saml/saml2_endpoints.py | ||
---|---|---|
37 | 37 |
from django.views.decorators.http import require_POST |
38 | 38 |
from django.contrib.auth import BACKEND_SESSION_KEY, REDIRECT_FIELD_NAME |
39 | 39 |
from django.conf import settings |
40 |
from django.utils.encoding import smart_unicode
|
|
40 |
from django.utils.encoding import smart_text
|
|
41 | 41 |
from django.contrib.auth import load_backend |
42 | 42 |
from django.shortcuts import render, redirect |
43 | 43 |
from django.contrib import messages |
... | ... | |
306 | 306 |
elif value is False: |
307 | 307 |
value = u'false' |
308 | 308 |
else: |
309 |
value = smart_unicode(value)
|
|
309 |
value = smart_text(value)
|
|
310 | 310 |
value = value.encode('utf-8') |
311 | 311 |
text_node = lasso.MiscTextNode.newWithString(value) |
312 | 312 |
text_node.textChild = True |
src/authentic2/idp/templatetags/breadcrumbs.py | ||
---|---|---|
13 | 13 | |
14 | 14 |
from django import template |
15 | 15 |
from django.template import loader, Node, Variable |
16 |
from django.utils.encoding import smart_str, smart_unicode
|
|
16 |
from django.utils.encoding import smart_str, smart_text
|
|
17 | 17 |
from django.template.defaulttags import url |
18 | 18 |
from django.template import VariableDoesNotExist |
19 | 19 | |
... | ... | |
83 | 83 | |
84 | 84 |
else: |
85 | 85 |
title=title.strip("'").strip('"') |
86 |
title=smart_unicode(title)
|
|
86 |
title=smart_text(title)
|
|
87 | 87 | |
88 | 88 |
url = None |
89 | 89 | |
... | ... | |
113 | 113 |
title = '' |
114 | 114 |
else: |
115 | 115 |
title=title.strip("'").strip('"') |
116 |
title=smart_unicode(title)
|
|
116 |
title=smart_text(title)
|
|
117 | 117 | |
118 | 118 |
url = self.url_node.render(context) |
119 | 119 |
return create_crumb(title, url) |
120 |
- |