From abd0883b61c303e591834c1330fabc657f53436f Mon Sep 17 00:00:00 2001 From: Kaveh Date: Mon, 9 Mar 2015 14:44:43 -0500 Subject: [PATCH 1/2] Updated INSTALLED_APPS for 'collectfast'. --- .../{{cookiecutter.repo_name}}/config/production.py | 7 ++++++- 1 file changed, 6 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 5a30893b..73f8b510 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py @@ -7,6 +7,8 @@ Production Configurations - Use sendgrid to send emails - Use MEMCACHIER on Heroku ''' +import django + from configurations import values # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings @@ -83,7 +85,10 @@ class Production(Common): # see: https://github.com/antonagestam/collectfast AWS_PRELOAD_METADATA = True - INSTALLED_APPS += ('collectfast', ) + if django.VERSION < (1, 7): + INSTALLED_APPS += ('collectfast', ) + else: + INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS # AWS cache settings, don't change unless you know what you're doing: AWS_EXPIRY = 60 * 60 * 24 * 7 From 431f7a69a3d2014bfaf1524e8add66f1ff0ea33f Mon Sep 17 00:00:00 2001 From: Kaveh Date: Thu, 12 Mar 2015 08:58:01 -0500 Subject: [PATCH 2/2] Removed django version check for collectfast. --- CONTRIBUTORS.txt | 1 + .../{{cookiecutter.repo_name}}/config/production.py | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 0d99b2d6..55f3251f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -37,6 +37,7 @@ Martin Blech Andy Rose Andrew Mikhnevich / @zcho Kevin Ndung'u / @kevgathuku +Kaveh / @ka7eh * Possesses commit rights diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py index 73f8b510..fb0711f4 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py @@ -7,8 +7,6 @@ Production Configurations - Use sendgrid to send emails - Use MEMCACHIER on Heroku ''' -import django - from configurations import values # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings @@ -83,12 +81,10 @@ class Production(Common): AWS_AUTO_CREATE_BUCKET = True AWS_QUERYSTRING_AUTH = False - # see: https://github.com/antonagestam/collectfast + # See: https://github.com/antonagestam/collectfast + # For Django 1.7+, 'collectfast' should come before 'django.contrib.staticfiles' AWS_PRELOAD_METADATA = True - if django.VERSION < (1, 7): - INSTALLED_APPS += ('collectfast', ) - else: - INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS + INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS # AWS cache settings, don't change unless you know what you're doing: AWS_EXPIRY = 60 * 60 * 24 * 7