diff --git a/tailbone/views/common.py b/tailbone/views/common.py index e5710f2b..f48bdbe4 100644 --- a/tailbone/views/common.py +++ b/tailbone/views/common.py @@ -84,7 +84,14 @@ class CommonView(View): """ with open(self.robots_txt_path, 'rt') as f: content = f.read() - return Response(content_type=six.binary_type('text/plain'), body=content) + response = self.request.response + if six.PY3: + response.text = content + response.content_type = 'text/plain' + else: + response.body = content + response.content_type = b'text/plain' + return response def mobile_home(self): """