diff --git a/README.rst b/README.rst index 23cc2672..589f1c92 100644 --- a/README.rst +++ b/README.rst @@ -110,7 +110,7 @@ Two Scoops of Django 1.11 :alt: Two Scoops of Django :target: http://twoscoopspress.org/products/two-scoops-of-django-1-11 -Two Scoops of Django is the best dairy-themed Django reference in the universe +Two Scoops of Django is the best dessert-themed Django reference in the universe pyup ~~~~~~~~~~~~~~~~~~ diff --git a/requirements.txt b/requirements.txt index 5e6edecd..6d3fa8cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.12.14 binaryornot==0.4.4 # Testing -pytest==3.2.3 +pytest==3.2.5 pycodestyle==2.3.1 pyflakes==1.6.0 tox==2.9.1 diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index cc518644..9eeb46bc 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -169,7 +169,7 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [ ('django.template.loaders.cached.Loader', [ 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ]), ] - +{% set _DEFAULT_CONN_MAX_AGE=60 %} # DATABASE CONFIGURATION # ------------------------------------------------------------------------------ {% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} @@ -182,12 +182,14 @@ DATABASES = { 'PASSWORD': env('RDS_PASSWORD'), 'HOST': env('RDS_HOSTNAME'), 'PORT': env('RDS_PORT'), + 'CONN_MAX_AGE': env.int('CONN_MAX_AGE', default={{ _DEFAULT_CONN_MAX_AGE }}), } } {% else %} # Use the Heroku-style specification # Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ DATABASES['default'] = env.db('DATABASE_URL') +DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', default={{ _DEFAULT_CONN_MAX_AGE }}) {%- endif %} # CACHING diff --git a/{{cookiecutter.project_slug}}/env.example b/{{cookiecutter.project_slug}}/env.example index cbde7649..420ab4a5 100644 --- a/{{cookiecutter.project_slug}}/env.example +++ b/{{cookiecutter.project_slug}}/env.example @@ -2,6 +2,7 @@ # PostgreSQL POSTGRES_PASSWORD=mysecretpass POSTGRES_USER=postgresuser +CONN_MAX_AGE= # Domain name, used by caddy DOMAIN_NAME={{ cookiecutter.domain_name }} diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index cd89783b..33372244 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,7 @@ # Local development dependencies go here -r base.txt -coverage==4.4.1 +coverage==4.4.2 django-coverage-plugin==1.5.0 Sphinx==1.6.5 @@ -10,7 +10,7 @@ Werkzeug==0.12.2 django-test-plus==1.0.20 factory-boy==2.9.2 -django-debug-toolbar==1.8 +django-debug-toolbar==1.9.1 # improved REPL ipdb==0.10.3 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 063d3f63..5c60fe8b 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -7,7 +7,7 @@ psycopg2==2.7.3.2 {%- endif %} -coverage==4.4.1 +coverage==4.4.2 flake8==3.5.0 # pyup: != 2.6.0 django-test-plus==1.0.20 factory-boy==2.9.2