From 9661ecaf8feb7c9a615199f044f8d469df2c3340 Mon Sep 17 00:00:00 2001 From: Sander van Leeuwen Date: Wed, 25 Oct 2017 14:11:36 +0200 Subject: [PATCH 001/154] Remove boto related settings that aren't used Since upgrade to boto3 in commit 12db5176d6c4c we don't need AWS_HEADERS anymore --- .../config/settings/production.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index cc518644a..b332c776f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -100,17 +100,6 @@ AWS_STORAGE_BUCKET_NAME = env('DJANGO_AWS_STORAGE_BUCKET_NAME') AWS_AUTO_CREATE_BUCKET = True AWS_QUERYSTRING_AUTH = False -# AWS cache settings, don't change unless you know what you're doing: -AWS_EXPIRY = 60 * 60 * 24 * 7 - -# TODO See: https://github.com/jschneier/django-storages/issues/47 -# Revert the following and use str after the above-mentioned bug is fixed in -# either django-storage-redux or boto -control = 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIRY, AWS_EXPIRY) -AWS_HEADERS = { - 'Cache-Control': bytes(control, encoding='latin-1') -} - # URL that handles the media served from MEDIA_ROOT, used for managing # stored files. {% if cookiecutter.use_whitenoise == 'y' -%} From 356a31806f21eff1caf883eea926d5f7e9b4f48e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 13 Dec 2017 13:25:05 +0100 Subject: [PATCH 002/154] Update raven from 6.3.0 to 6.4.0 (#1402) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 4ba9d6e03..4b01929ba 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==1.2 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==6.3.0 +raven==6.4.0 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From 9a978ef0feaee3e1ffab7d9d4b1aa7e3ee331c33 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 13 Dec 2017 13:25:22 +0100 Subject: [PATCH 003/154] Update pytest from 3.2.5 to 3.3.1 (#1399) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6d3fa8cda..addeef31e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.12.14 binaryornot==0.4.4 # Testing -pytest==3.2.5 +pytest==3.3.1 pycodestyle==2.3.1 pyflakes==1.6.0 tox==2.9.1 From 480bc8ef2553da2074befb9e2a1ee67f430410e4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 13 Dec 2017 13:25:55 +0100 Subject: [PATCH 004/154] Update django-extensions from 1.9.7 to 1.9.8 (#1398) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 33372244f..7b4e8dfb0 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -5,7 +5,7 @@ coverage==4.4.2 django-coverage-plugin==1.5.0 Sphinx==1.6.5 -django-extensions==1.9.7 +django-extensions==1.9.8 Werkzeug==0.12.2 django-test-plus==1.0.20 factory-boy==2.9.2 From 8b1fd8ec44952a37bbd236523b6f8abeace30c28 Mon Sep 17 00:00:00 2001 From: Ivan Savov Date: Wed, 13 Dec 2017 04:28:14 -0800 Subject: [PATCH 005/154] added norecursedirs to pytest.ini (#1376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to ensure running `pytest` in project root works when using Python 3.6 (otherwise tries to run python tests in `node-gyp` node module and fails with: ``` ―――――――――――――――――――――――――――――――――――――――――――― ERROR collecting node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py ―――――――――――――――――――――――――――――――――――――――――――― ../venv/lib/python3.6/site-packages/_pytest/python.py:395: in _importtestmodule mod = self.fspath.pyimport(ensuresyspath=importmode) ../venv/lib/python3.6/site-packages/py/_path/local.py:662: in pyimport __import__(modname) E File "/Users/ivan/Projects/Minireference/ClassroomLinksProject/classroomlinks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 37 E print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), E ^ E SyntaxError: invalid syntax ``` --- {{cookiecutter.project_slug}}/pytest.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.project_slug}}/pytest.ini b/{{cookiecutter.project_slug}}/pytest.ini index 5b4369b89..89c5e63f9 100644 --- a/{{cookiecutter.project_slug}}/pytest.ini +++ b/{{cookiecutter.project_slug}}/pytest.ini @@ -1,2 +1,5 @@ [pytest] DJANGO_SETTINGS_MODULE=config.settings.test +{% if cookiecutter.js_task_runner != 'None' %} +norecursedirs = node_modules +{% endif %} From a4319f76bdaff1cda145f07a11db10a299bd973a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 13 Dec 2017 13:37:40 +0100 Subject: [PATCH 006/154] Update boto3 from 1.4.7 to 1.4.8 (#1393) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 4b01929ba..7e0495546 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.4.7 +boto3==1.4.8 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.5.2 From c410a49ed180747a74ac13cad2a846e837a1e5b0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 13 Dec 2017 14:05:54 +0100 Subject: [PATCH 007/154] Update werkzeug from 0.12.2 to 0.13 (#1403) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 7b4e8dfb0..e37475666 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -6,7 +6,7 @@ django-coverage-plugin==1.5.0 Sphinx==1.6.5 django-extensions==1.9.8 -Werkzeug==0.12.2 +Werkzeug==0.13 django-test-plus==1.0.20 factory-boy==2.9.2 From 0d1ced03ec0a0e5af1052b30e5a5cef9ddb1d374 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 13 Dec 2017 14:06:09 +0100 Subject: [PATCH 008/154] Update collectfast from 0.5.2 to 0.6.0 (#1401) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 7e0495546..538221405 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.7.1 boto3==1.4.8 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.5.2 +Collectfast==0.6.0 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From d2dd265a9968740ddf6e59686c4ec520e4d52ff2 Mon Sep 17 00:00:00 2001 From: Pierre Chiquet Date: Wed, 13 Dec 2017 14:06:48 +0100 Subject: [PATCH 009/154] Fix MediaRootS3BotoStorage: do not override existing files (#1367) * Fix MediaRootS3BotoStorage: do not override existing files see https://github.com/jschneier/django-storages/issues/50 * Update "other contributors" * alphabetical order --- CONTRIBUTORS.rst | 1 + {{cookiecutter.project_slug}}/config/settings/production.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 08bca9078..4cf632db2 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -127,6 +127,7 @@ Listed in alphabetical order. Pablo `@oubiga`_ Parbhat Puri `@parbhat`_ Peter Bittner `@bittner`_ + Pierre Chiquet `@pchiquet`_ Raphael Pierzina `@hackebrot`_ Raony Guimarães Corrêa `@raonyguimaraes`_ Reggie Riser `@reggieriser`_ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 9eeb46bc4..db5813061 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -120,7 +120,7 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' # See:http://stackoverflow.com/questions/10390244/ from storages.backends.s3boto3 import S3Boto3Storage StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa -MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media') # noqa +MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media', file_overwrite=False) # noqa DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage' MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME From 5e39a94621f5a93822d72c07f2071c7c1a923313 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 15 Dec 2017 14:12:09 +0100 Subject: [PATCH 010/154] Update boto3 from 1.4.8 to 1.5.0 (#1405) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 538221405..01c464901 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.4.8 +boto3==1.5.0 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From 2fcaf557246b0968ef4b58b8f60a4fcb377631ac Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 15 Dec 2017 14:12:20 +0100 Subject: [PATCH 011/154] Update opbeat from 3.5.3 to 3.6.0 (#1404) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 01c464901..fd9d81223 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -35,5 +35,5 @@ raven==6.4.0 {% if cookiecutter.use_opbeat == "y" -%} # Opbeat agent for performance monitoring # ----------------------------------------- -opbeat==3.5.3 +opbeat==3.6.0 {%- endif %} From 5ba730bfa37ca31c934a598e851695f199411129 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 17 Dec 2017 13:44:51 +0100 Subject: [PATCH 012/154] Update boto3 from 1.5.0 to 1.5.1 (#1406) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index fd9d81223..a2021ff1d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.5.0 +boto3==1.5.1 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From d372ec05f956e2de303a667596c174ce2cb06ab4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 17 Dec 2017 13:52:31 +0100 Subject: [PATCH 013/154] Update django-test-plus to 1.0.21 (#1407) * Update django-test-plus from 1.0.20 to 1.0.21 * Update django-test-plus from 1.0.20 to 1.0.21 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e37475666..f86cae8cc 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -7,7 +7,7 @@ django-coverage-plugin==1.5.0 Sphinx==1.6.5 django-extensions==1.9.8 Werkzeug==0.13 -django-test-plus==1.0.20 +django-test-plus==1.0.21 factory-boy==2.9.2 django-debug-toolbar==1.9.1 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 5c60fe8b7..31ab8ff19 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -9,7 +9,7 @@ psycopg2==2.7.3.2 coverage==4.4.2 flake8==3.5.0 # pyup: != 2.6.0 -django-test-plus==1.0.20 +django-test-plus==1.0.21 factory-boy==2.9.2 django-coverage-plugin==1.5.0 From cb7befdf5228c029c2f044377fc69df092aecca7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 19 Dec 2017 13:58:48 +0100 Subject: [PATCH 014/154] Update boto3 from 1.5.1 to 1.5.2 (#1408) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index a2021ff1d..d71feeeef 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.5.1 +boto3==1.5.2 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From dfcf646ded01eb27d2099959b2e1ef8385e8babb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 20 Dec 2017 16:24:34 +0100 Subject: [PATCH 015/154] Update boto3 from 1.5.2 to 1.5.3 (#1411) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index d71feeeef..f5fd3b327 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.5.2 +boto3==1.5.3 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From a48ef41e7094ac91f80f0130e3efc0d9826bb47b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 21 Dec 2017 02:13:21 +0100 Subject: [PATCH 016/154] Update boto3 from 1.5.3 to 1.5.4 (#1412) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index f5fd3b327..1aff2ce37 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.5.3 +boto3==1.5.4 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From 7797585a123828c808c4a0d5893fc34e5a0d7f0a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 28 Dec 2017 13:36:12 +0100 Subject: [PATCH 017/154] Update boto3 from 1.5.4 to 1.5.6 (#1414) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 1aff2ce37..603fdb805 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.5.4 +boto3==1.5.6 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From 5395687f730f70db16821273f2a7a0efe1fe3dd6 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 28 Dec 2017 08:19:19 -0800 Subject: [PATCH 018/154] Upgraded to Django 1.11 to resolve --- CHANGELOG.md | 4 ++++ README.rst | 4 ++-- {{cookiecutter.project_slug}}/requirements/base.txt | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a142fc5..973406574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-12-28] +### Changed +- Upgraded to Django 1.11 (@pydanny) + ## [2015-10-08] ### Changed - Elastic Beanstalk: Added --noinput to migrate command (@MightySCollins ) diff --git a/README.rst b/README.rst index 589f1c92e..838253f4c 100644 --- a/README.rst +++ b/README.rst @@ -34,8 +34,8 @@ production-ready Django projects quickly. Features --------- -* For Django 1.10 -* Works with Python 3.4.x or 3.5.x. Python 3.6 is experimental +* For Django 1.11 +* Works with Python 3.6 * Renders Django projects with 100% starting test coverage * Twitter Bootstrap_ v4.0.0 - beta 1 (`maintained Foundation fork`_ also available) * 12-Factor_ based settings via django-environ_ diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 00e86bf44..369d8464f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -5,8 +5,8 @@ wheel==0.30.0 -# Bleeding edge Django -django==1.10.8 # pyup: >=1.10,<1.11 +# Conservative Django +django==1.11.8 # pyup: <2.0 # Configuration django-environ==0.4.4 From 35ab85b2a2fddb39daee52b14911067e21abe4eb Mon Sep 17 00:00:00 2001 From: Dan Shultz Date: Thu, 28 Dec 2017 10:28:08 -0600 Subject: [PATCH 019/154] Add OS packages for Elastic Beanstalk deployments (#1277) Fixes #1270 --- {{cookiecutter.project_slug}}/.ebextensions/10_packages.config | 2 ++ {{cookiecutter.project_slug}}/.ebextensions/40_python.config | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config index c0774efae..136be5338 100644 --- a/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config +++ b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config @@ -3,3 +3,5 @@ packages: git: [] postgresql94-devel: [] libjpeg-turbo-devel: [] + libffi: [] + libffi-devel: [] diff --git a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config index 111bf1ca8..03b91eb4a 100644 --- a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config +++ b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config @@ -10,7 +10,7 @@ option_settings: REDIS_ENDPOINT_ADDRESS: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Address"]}`' REDIS_PORT: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Port"]}`' "aws:elasticbeanstalk:container:python": - WSGIPath: "config/wsgi.py" + WSGIPath: config/wsgi.py NumProcesses: 3 NumThreads: 20 "aws:elasticbeanstalk:container:python:staticfiles": From 734526a8c5746d3b8065f42a36a288c568caf13b Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 28 Dec 2017 08:30:33 -0800 Subject: [PATCH 020/154] Bump to include Python 3.6 --- .travis.yml | 3 ++- setup.py | 2 +- tox.ini | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ca40c77a..e25a51716 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,12 @@ services: language: python -python: 3.5 +python: 3.6 env: - TOX_ENV=py34 - TOX_ENV=py35 + - TOX_ENV=py36 before_install: - sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list' diff --git a/setup.py b/setup.py index 6dc6635ea..a300dc7fc 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = '1.10.7' +version = '1.11.8' if sys.argv[-1] == 'tag': os.system('git tag -a %s -m "version %s"' % (version, version)) diff --git a/tox.ini b/tox.ini index 311d80f45..f879355ae 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = true -envlist = py34,py35 +envlist = py34,py35,py36 [testenv] passenv = LC_ALL, LANG, HOME From d7e70a00b66f2769d31ab92057d46c217a75c8d9 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 28 Dec 2017 08:32:13 -0800 Subject: [PATCH 021/154] Updated changelog dates to 2017 --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 973406574..c40bb26b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [2015-12-28] +## [2017-12-28] ### Changed - Upgraded to Django 1.11 (@pydanny) -## [2015-10-08] +## [2017-10-08] ### Changed - Elastic Beanstalk: Added --noinput to migrate command (@MightySCollins ) -## [2015-10-07] +## [2017-10-07] ### Added - Finished first pass at Elastic Beanstalk docs (@pydanny & @audreyr) ### Deleted From 806f03310ba0843ccf701b7831f06d1965fc6bb2 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 28 Dec 2017 08:45:28 -0800 Subject: [PATCH 022/154] Python 3.6 or go home --- .travis.yml | 2 -- tox.ini | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e25a51716..f6e18b521 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,6 @@ language: python python: 3.6 env: - - TOX_ENV=py34 - - TOX_ENV=py35 - TOX_ENV=py36 before_install: diff --git a/tox.ini b/tox.ini index f879355ae..a16b80ed6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = true -envlist = py34,py35,py36 +envlist = py36 [testenv] passenv = LC_ALL, LANG, HOME From 62e822a8eef542e4b815e8fa9349154439e7c542 Mon Sep 17 00:00:00 2001 From: Christian Stade-Schuldt Date: Thu, 28 Dec 2017 19:26:55 +0100 Subject: [PATCH 023/154] add PostgreSQL version 10 (#1394) --- cookiecutter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index 8addeeada..184e87968 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -18,7 +18,7 @@ "use_heroku": "n", "use_elasticbeanstalk_experimental": "n", "use_compressor": "n", - "postgresql_version": ["9.6", "9.5", "9.4", "9.3", "9.2"], + "postgresql_version": ["10", "9.6", "9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], "custom_bootstrap_compilation": "n", "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] From 88d3a4cc8cb6973faa8deaabaf39ba387f3303e3 Mon Sep 17 00:00:00 2001 From: Reggie Riser Date: Thu, 28 Dec 2017 15:52:22 -0500 Subject: [PATCH 024/154] Fixing leftovers from migration to Django 1.11 and Python 3.6. --- CONTRIBUTING.rst | 4 ++-- docs/deployment-on-pythonanywhere.rst | 2 +- docs/deployment-with-elastic-beanstalk.rst | 2 +- hooks/pre_gen_project.py | 4 ++-- requirements_to_watch.txt | 4 +--- setup.py | 5 ++--- {{cookiecutter.project_slug}}/.travis.yml | 2 +- .../compose/local/django/Dockerfile | 2 +- .../compose/production/django/Dockerfile | 2 +- {{cookiecutter.project_slug}}/docs/docker_ec2.rst | 2 +- {{cookiecutter.project_slug}}/runtime.txt | 2 +- .../{{cookiecutter.project_slug}}/users/models.py | 2 +- .../{{cookiecutter.project_slug}}/users/tests/test_urls.py | 2 +- .../{{cookiecutter.project_slug}}/users/views.py | 5 ++--- 14 files changed, 18 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index efff1fad9..0e4e258c4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -39,9 +39,9 @@ To run all tests using various versions of python in virtualenvs defined in tox. It is possible to tests with some versions of python, to do this the command is:: - $ tox -e py34,py35 + $ tox -e py35,py36 -Will run py.test with the python3.4, and python3.5 interpreters, for +Will run py.test with the python3.5, and python3.6 interpreters, for example. To run a particular test with tox for against your current Python version:: diff --git a/docs/deployment-on-pythonanywhere.rst b/docs/deployment-on-pythonanywhere.rst index 07b46bc05..d70684bd9 100644 --- a/docs/deployment-on-pythonanywhere.rst +++ b/docs/deployment-on-pythonanywhere.rst @@ -35,7 +35,7 @@ Make sure your project is fully commited and pushed up to Bitbucket or Github or git clone # you can also use hg cd my-project-name - mkvirtualenv --python=/usr/bin/python3.5 my-project-name + mkvirtualenv --python=/usr/bin/python3.6 my-project-name pip install -r requirements/production.txt # may take a few minutes diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index e8aae8853..5edf17954 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -20,7 +20,7 @@ Instructions If you haven't done so, create a directory of environments:: - eb init -p python3.4 MY_PROJECT_SLUG + eb init -p python3.6 MY_PROJECT_SLUG Replace `MY_PROJECT_SLUG` with the value you entered for `project_slug`. diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index c7a68450b..d509a4648 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -16,7 +16,7 @@ if docker == 'n': python_major_version = sys.version_info[0] if python_major_version == 2: - sys.stdout.write("WARNING: Cookiecutter Django does not support Python 2! Stability is guaranteed with Python 3.4+ only. Are you sure you want to proceed? (y/n)") + sys.stdout.write("WARNING: Cookiecutter Django does not support Python 2! Stability is guaranteed with Python 3.6+ only. Are you sure you want to proceed? (y/n)") yes_options = set(['y']) no_options = set(['n', '']) @@ -26,6 +26,6 @@ if docker == 'n': elif choice in yes_options: pass else: - sys.stdout.write("Please respond with %s or %s" + sys.stdout.write("Please respond with %s or %s" % (', '.join([o for o in yes_options if not o == '']) , ', '.join([o for o in no_options if not o == '']))) diff --git a/requirements_to_watch.txt b/requirements_to_watch.txt index 4440448d4..91f0041bf 100644 --- a/requirements_to_watch.txt +++ b/requirements_to_watch.txt @@ -1,4 +1,2 @@ -# These requirements prevented an upgrade to Django 1.10. -django-coverage-plugin==1.5.0 +# These requirements prevented an upgrade to Django 1.11. django-autoslug==1.9.3 - diff --git a/setup.py b/setup.py index a300dc7fc..29db1f6d1 100644 --- a/setup.py +++ b/setup.py @@ -34,14 +34,13 @@ setup( classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', - 'Framework :: Django :: 1.10', + 'Framework :: Django :: 1.11', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development', diff --git a/{{cookiecutter.project_slug}}/.travis.yml b/{{cookiecutter.project_slug}}/.travis.yml index 216b8709b..5ca54d000 100644 --- a/{{cookiecutter.project_slug}}/.travis.yml +++ b/{{cookiecutter.project_slug}}/.travis.yml @@ -8,4 +8,4 @@ before_install: - sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm language: python python: - - "3.5" + - "3.6" diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index e62b524a4..b9ee34b76 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.5 +FROM python:3.6 ENV PYTHONUNBUFFERED 1 diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index fcbe51844..48923c80b 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.5 +FROM python:3.6 ENV PYTHONUNBUFFERED 1 diff --git a/{{cookiecutter.project_slug}}/docs/docker_ec2.rst b/{{cookiecutter.project_slug}}/docs/docker_ec2.rst index 3e43ed767..606d29563 100644 --- a/{{cookiecutter.project_slug}}/docs/docker_ec2.rst +++ b/{{cookiecutter.project_slug}}/docs/docker_ec2.rst @@ -58,7 +58,7 @@ The `Docker compose documentation`_ explains in detail what you can accomplish i build: database webapp: build: webapp: - command: /usr/bin/python3.4 manage.py runserver 0.0.0.0:8000 # dev setting + command: /usr/bin/python3.6 manage.py runserver 0.0.0.0:8000 # dev setting # command: gunicorn -b 0.0.0.0:8000 wsgi:application # production setting volumes: - webapp/your_project_name:/path/to/container/workdir/ diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index cfa5aa5ca..02d0df5e8 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.6.2 +python-3.6.3 diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py index c06f15da4..9a831b48c 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py @@ -1,6 +1,6 @@ from django.contrib.auth.models import AbstractUser -from django.core.urlresolvers import reverse from django.db import models +from django.urls import reverse from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_urls.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_urls.py index 6e181cc8e..4935b0f3e 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_urls.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_urls.py @@ -1,4 +1,4 @@ -from django.core.urlresolvers import reverse, resolve +from django.urls import reverse, resolve from test_plus.test import TestCase diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py index 777f42b74..acde4a8fc 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py @@ -1,7 +1,6 @@ -from django.core.urlresolvers import reverse -from django.views.generic import DetailView, ListView, RedirectView, UpdateView - from django.contrib.auth.mixins import LoginRequiredMixin +from django.urls import reverse +from django.views.generic import DetailView, ListView, RedirectView, UpdateView from .models import User From 8725809f5e24676990fed2a3772ba3dff5232ab5 Mon Sep 17 00:00:00 2001 From: Reggie Riser Date: Thu, 28 Dec 2017 16:26:48 -0500 Subject: [PATCH 025/154] Fixed old Docker service name in PyCharm run configurations. (#1419) --- .../.idea/runConfigurations/Docker__migrate.xml | 2 +- .../.idea/runConfigurations/Docker__tests___all.xml | 2 +- .../.idea/runConfigurations/Docker__tests___class__TestUser.xml | 2 +- .../runConfigurations/Docker__tests___file__test_models.xml | 2 +- .../.idea/runConfigurations/Docker__tests___module__users.xml | 2 +- .../Docker__tests___specific__test_get_absolute_url.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml index 95f45bfb7..cc2fe0bb0 100644 --- a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml @@ -6,7 +6,7 @@ -