0001-py3-send-base64-document-as-str-in-storeResource-465.patch
passerelle_minint/minint_maarch/views.py | ||
---|---|---|
21 | 21 |
import requests |
22 | 22 | |
23 | 23 |
from django.views.generic import DetailView as GenericDetailView |
24 |
from django.utils.decorators import method_decorator |
|
25 | 24 |
from django.utils import six |
25 |
from django.utils.decorators import method_decorator |
|
26 |
from django.utils.encoding import force_text |
|
26 | 27 |
from django.utils.six.moves.urllib import parse as urlparse |
27 | 28 |
from django.views.decorators.csrf import csrf_exempt |
28 | 29 | |
... | ... | |
167 | 168 |
if page and not empty_page: # add last page, if it contains values |
168 | 169 |
document += page |
169 | 170 |
document += '</body></html>' |
170 |
encodedFile = base64.b64encode(document.encode('utf-8'))
|
|
171 |
encodedFile = force_text(base64.b64encode(document.encode('utf-8')))
|
|
171 | 172 |
fileFormat = 'html' |
172 | 173 | |
173 | 174 |
if debug: |
... | ... | |
571 | 572 |
document += page |
572 | 573 |
document += '</body></html>' |
573 | 574 |
logger.debug('DOCUMENT HTML %r ', document) |
574 |
encodedFile = base64.b64encode(document.encode('utf-8'))
|
|
575 |
encodedFile = force_text(base64.b64encode(document.encode('utf-8')))
|
|
575 | 576 |
fileFormat = 'html' |
576 | 577 | |
577 | 578 |
if debug: |
578 |
- |