From 76839c48cf2ad5e59e145f9b835591558bda4715 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 9 Feb 2020 15:32:22 -0600 Subject: [PATCH] Fix email preview for TXT templates on python3 --- tailbone/views/email.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tailbone/views/email.py b/tailbone/views/email.py index 39b96733..1349d4cc 100644 --- a/tailbone/views/email.py +++ b/tailbone/views/email.py @@ -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