From 04f051111195d6867083add18dc75f61a795908b Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Wed, 22 Jan 2014 22:46:34 +0530 Subject: [PATCH] feat(aws/s3): use Collectfast by @antonagestam for faster collectstatic. --- {{cookiecutter.repo_name}}/requirements/production.txt | 3 ++- .../{{cookiecutter.project_name}}/config/settings.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index dcaeea79..219b749a 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -4,5 +4,6 @@ gunicorn==0.17.4 django-storages==1.1.4 +Collectfast==0.1.13 gevent==0.13.8 -boto==2.9.5 \ No newline at end of file +boto==2.9.5 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/config/settings.py b/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/config/settings.py index b56fc041..8b014a23 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/config/settings.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/config/settings.py @@ -100,7 +100,7 @@ class Common(Configuration): join(BASE_DIR, 'fixtures'), ) ########## END FIXTURE CONFIGURATION - + ########## EMAIL CONFIGURATION EMAIL_BACKEND = values.Value('django.core.mail.backends.smtp.EmailBackend') ########## END EMAIL CONFIGURATION @@ -348,6 +348,10 @@ class Production(Common): AWS_AUTO_CREATE_BUCKET = True AWS_QUERYSTRING_AUTH = False + # see: https://github.com/antonagestam/collectfast + AWS_PRELOAD_METADATA = True + INSTALLED_APPS += ("collectfast", ) + # AWS cache settings, don't change unless you know what you're doing: AWS_EXPIREY = 60 * 60 * 24 * 7 AWS_HEADERS = {