From 0cc9958635c4967dee8b2aef8ff636148c0763c0 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Sun, 26 Apr 2015 11:15:48 +0530 Subject: [PATCH] fix(settings/production): Use python2/3 compatible unicode->btye conversion --- .../{{cookiecutter.repo_name}}/config/production.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py index 38d304d2..2c1b3857 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py @@ -11,6 +11,7 @@ from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat +from django.utils import six from .common import * # noqa @@ -80,7 +81,7 @@ AWS_EXPIRY = 60 * 60 * 24 * 7 # Revert the following and use str after the above-mentioned bug is fixed in # either django-storage-redux or boto AWS_HEADERS = { - 'Cache-Control': str.encode('max-age=%d, s-maxage=%d, must-revalidate' % ( + 'Cache-Control': six.b('max-age=%d, s-maxage=%d, must-revalidate' % ( AWS_EXPIRY, AWS_EXPIRY)) }