Fix email preview for TXT templates on python3
This commit is contained in:
parent
6925c460c5
commit
76839c48cf
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
# Copyright © 2010-2020 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -323,7 +323,7 @@ class EmailPreview(View):
|
|||
data = email.obtain_sample_data(self.request)
|
||||
self.request.response.text = template.render(**data)
|
||||
if type_ == 'txt':
|
||||
self.request.response.content_type = b'text/plain'
|
||||
self.request.response.content_type = str('text/plain')
|
||||
return self.request.response
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue