From 5510c7614756eefc502e9286ab21f076b417d7bf Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 1 Jan 2018 21:57:56 -0800 Subject: [PATCH 01/39] Update django from 1.11.8 to 1.11.9 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 369d8464..85451a45 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -6,7 +6,7 @@ wheel==0.30.0 # Conservative Django -django==1.11.8 # pyup: <2.0 +django==1.11.9 # pyup: <2.0 # Configuration django-environ==0.4.4 From 184b3584a05173ed15272bc45369d37ebb25bedb Mon Sep 17 00:00:00 2001 From: pdehaye Date: Fri, 5 Jan 2018 02:54:58 +0100 Subject: [PATCH 02/39] Helpful warning for Beanstalk/python 3.6 (#1432) --- docs/deployment-with-elastic-beanstalk.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index e8aae885..d481c93b 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -21,6 +21,9 @@ Instructions If you haven't done so, create a directory of environments:: eb init -p python3.4 MY_PROJECT_SLUG + # Warning: If you use python3.6, you will run into problems later due to some incompatibility with + # mod_wgsi 3.5 (packaged in 64bit Amazon Linux 2017.09 v2.6.1 running Python 3.6). See: + # https://serverfault.com/questions/884469/mod-wsgi-call-to-site-addsitedir-failed-on-aws-elastic-beanstalk-python-3/885445 Replace `MY_PROJECT_SLUG` with the value you entered for `project_slug`. From 0bf587c139533811d80b4958b68bdefe70a81107 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 5 Jan 2018 02:55:20 +0100 Subject: [PATCH 03/39] Fix duplicated and missing links in README (#1430) --- {{cookiecutter.project_slug}}/README.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 924e238d..c4bf9fe3 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -79,8 +79,6 @@ Email Server {% if cookiecutter.use_docker == 'y' %} In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container. -.. _mailhog: https://github.com/mailhog/MailHog - Container mailhog will start automatically when you will run all docker containers. Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers. @@ -88,8 +86,6 @@ With MailHog running, to view messages that are sent by your application, open y {% else %} In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available. -.. _mailhog: https://github.com/mailhog/MailHog - To start the service, make sure you have nodejs installed, and then type the following:: $ npm install @@ -101,6 +97,7 @@ To view messages that are sent by your application, open your browser and go to The email server will exit when you exit the Grunt task on the CLI with Ctrl+C. {% endif %} +.. _mailhog: https://github.com/mailhog/MailHog {% endif %} {% if cookiecutter.use_sentry_for_error_reporting == "y" %} @@ -142,7 +139,7 @@ Elastic Beanstalk See detailed `cookiecutter-django Elastic Beanstalk documentation`_. -.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html +.. _`cookiecutter-django Elastic Beanstalk documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html {% endif %} {% if cookiecutter.custom_bootstrap_compilation == "y" %} From 14868fad8bf0df201a4a9db29c04331a6fc333bd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 5 Jan 2018 17:10:05 +0100 Subject: [PATCH 04/39] Update werkzeug from 0.13 to 0.14.1 (#1423) --- {{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 f86cae8c..0f1e286f 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.13 +Werkzeug==0.14.1 django-test-plus==1.0.21 factory-boy==2.9.2 From 44e90477a5e26e339fa7d1e851dec71dc81c59b9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 5 Jan 2018 17:20:00 +0100 Subject: [PATCH 05/39] Update pytest from 3.3.1 to 3.3.2 (#1433) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index addeef31..1790a021 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.12.14 binaryornot==0.4.4 # Testing -pytest==3.3.1 +pytest==3.3.2 pycodestyle==2.3.1 pyflakes==1.6.0 tox==2.9.1 From 47bf26bd0e3e0bf5a8804f659c67748aa3085b30 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 5 Jan 2018 17:25:01 +0100 Subject: [PATCH 06/39] Update boto3 from 1.5.6 to 1.5.8 (#1427) --- {{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 603fdb80..cdc8643a 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.6 +boto3==1.5.8 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From f141ea655c6c85a7e90e736f3e86831c1857f281 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 5 Jan 2018 17:29:16 +0100 Subject: [PATCH 07/39] Update pillow from 4.3.0 to 5.0.0 (#1424) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 85451a45..97f370b7 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -22,7 +22,7 @@ django-crispy-forms==1.7.0 django-model-utils==3.0.0 # Images -Pillow==4.3.0 +Pillow==5.0.0 # Password storage argon2-cffi==16.3.0 From a6baa1741c429ac6ca88cd6bbafd73f0b3667e9f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 8 Jan 2018 16:32:45 +0100 Subject: [PATCH 08/39] Update argon2-cffi from 16.3.0 to 18.1.0 (#1435) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 97f370b7..3d1bc162 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -25,7 +25,7 @@ django-model-utils==3.0.0 Pillow==5.0.0 # Password storage -argon2-cffi==16.3.0 +argon2-cffi==18.1.0 # For user registration, either via email or social # Well-built with regular release cycles! From c476ae6e83a2fddee8f8f7a6b7a5014a84466019 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 8 Jan 2018 16:32:58 +0100 Subject: [PATCH 09/39] Update boto3 from 1.5.8 to 1.5.9 (#1434) --- {{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 cdc8643a..49942287 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.8 +boto3==1.5.9 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From 8bc20c14f06ca7922d43a85687790ef646b5ff2a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 8 Jan 2018 16:38:11 +0100 Subject: [PATCH 10/39] Update sphinx from 1.6.5 to 1.6.6 (#1436) --- {{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 0f1e286f..7846519d 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -4,7 +4,7 @@ coverage==4.4.2 django-coverage-plugin==1.5.0 -Sphinx==1.6.5 +Sphinx==1.6.6 django-extensions==1.9.8 Werkzeug==0.14.1 django-test-plus==1.0.21 From 0e9a8e0420c8923623ae4a374472d11090b5f364 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 9 Jan 2018 20:16:09 +0100 Subject: [PATCH 11/39] Update boto3 from 1.5.9 to 1.5.11 (#1439) --- {{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 49942287..b6d6abf3 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.9 +boto3==1.5.11 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From f5c0c2c759c2fe8b50839f7f5993014d2e2372c2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 10 Jan 2018 16:30:47 +0100 Subject: [PATCH 12/39] Update boto3 from 1.5.11 to 1.5.12 (#1440) --- {{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 b6d6abf3..5042686b 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.11 +boto3==1.5.12 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From f3574df3795866ef96aa54608c8b6ae597e5c2eb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 10 Jan 2018 16:31:00 +0100 Subject: [PATCH 13/39] Update django-test-plus to 1.0.22 (#1441) * Update django-test-plus from 1.0.21 to 1.0.22 * Update django-test-plus from 1.0.21 to 1.0.22 --- {{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 7846519d..0d42646d 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.6 django-extensions==1.9.8 Werkzeug==0.14.1 -django-test-plus==1.0.21 +django-test-plus==1.0.22 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 31ab8ff1..01e02c21 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.21 +django-test-plus==1.0.22 factory-boy==2.9.2 django-coverage-plugin==1.5.0 From a40121afd6110f1173e9237bfdbeec83ce2ebe88 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 10 Jan 2018 16:36:17 +0100 Subject: [PATCH 14/39] Update django-model-utils from 3.0.0 to 3.1.1 (#1442) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3d1bc162..81a375b1 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -19,7 +19,7 @@ whitenoise==3.3.1 django-crispy-forms==1.7.0 # Models -django-model-utils==3.0.0 +django-model-utils==3.1.1 # Images Pillow==5.0.0 From b2025a8f72506d192edd408549bba54a84667f2f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 13 Jan 2018 23:12:13 +0100 Subject: [PATCH 15/39] Update boto3 from 1.5.12 to 1.5.14 (#1447) --- {{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 5042686b..79a0cf2b 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.12 +boto3==1.5.14 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From 789bd97effab8fe9c6696e1dae9e24e538e4c317 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 14 Jan 2018 16:56:58 +0100 Subject: [PATCH 16/39] Update django-extensions from 1.9.8 to 1.9.9 (#1443) --- {{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 0d42646d..2622b778 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.6 -django-extensions==1.9.8 +django-extensions==1.9.9 Werkzeug==0.14.1 django-test-plus==1.0.22 factory-boy==2.9.2 From 793a46ba45229cf26c67d760c4b1df767a9e0f12 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 15 Jan 2018 12:33:51 -0800 Subject: [PATCH 17/39] Removed expiramental elastic beanstalk support and bumped official Django version to 1.11.9 --- CHANGELOG.md | 4 + LICENSE | 2 +- README.rst | 2 - cookiecutter.json | 1 - docs/deployment-with-elastic-beanstalk.rst | 75 ----------------- docs/index.rst | 1 - hooks/post_gen_project.py | 80 +++++++++---------- hooks/pre_gen_project.py | 6 +- setup.py | 2 +- .../.ebextensions/10_packages.config | 7 -- .../.ebextensions/20_elasticcache.config | 46 ----------- .../.ebextensions/30_options.config | 6 -- .../.ebextensions/40_python.config | 17 ---- .../.ebextensions/50_apache.config | 3 - .../.ebextensions/enable_mod_deflate.conf | 25 ------ {{cookiecutter.project_slug}}/README.rst | 9 --- .../config/settings/production.py | 25 +----- {{cookiecutter.project_slug}}/ebsetenv.py | 37 --------- 18 files changed, 46 insertions(+), 302 deletions(-) delete mode 100644 docs/deployment-with-elastic-beanstalk.rst delete mode 100644 {{cookiecutter.project_slug}}/.ebextensions/10_packages.config delete mode 100644 {{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config delete mode 100644 {{cookiecutter.project_slug}}/.ebextensions/30_options.config delete mode 100644 {{cookiecutter.project_slug}}/.ebextensions/40_python.config delete mode 100644 {{cookiecutter.project_slug}}/.ebextensions/50_apache.config delete mode 100644 {{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf delete mode 100644 {{cookiecutter.project_slug}}/ebsetenv.py diff --git a/CHANGELOG.md b/CHANGELOG.md index c40bb26b..24f8d11c 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/). +## [2018-01-15] +### Changed +- Removed Elastic Beanstalk support (@pydanny) + ## [2017-12-28] ### Changed - Upgraded to Django 1.11 (@pydanny) diff --git a/LICENSE b/LICENSE index 9a5d2fc0..da2bbe30 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2016, Daniel Greenfeld +Copyright (c) 2013-2018, Daniel Greenfeld All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/README.rst b/README.rst index 838253f4..35a8bc42 100644 --- a/README.rst +++ b/README.rst @@ -51,7 +51,6 @@ Features * Instructions for deploying to PythonAnywhere_ * Run tests with unittest or py.test * Customizable PostgreSQL version -* Experimental support for Amazon Elastic Beanstalk .. _`maintained Foundation fork`: https://github.com/Parbhat/cookiecutter-django-foundation @@ -185,7 +184,6 @@ Answer the prompts with your own desired options_. For example:: 4 - Apache Software License 2.0 5 - Not open source Choose from 1, 2, 3, 4, 5 [1]: 1 - use_elasticbeanstalk_experimental: n Enter the project and take a look around:: diff --git a/cookiecutter.json b/cookiecutter.json index 184e8796..933c3dfa 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -16,7 +16,6 @@ "windows": "n", "use_docker": "n", "use_heroku": "n", - "use_elasticbeanstalk_experimental": "n", "use_compressor": "n", "postgresql_version": ["10", "9.6", "9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst deleted file mode 100644 index d481c93b..00000000 --- a/docs/deployment-with-elastic-beanstalk.rst +++ /dev/null @@ -1,75 +0,0 @@ -Deployment with Elastic Beanstalk -========================================== - -.. index:: Elastic Beanstalk - -Warning: Experimental ---------------------- - -This is experimental. For the time being there will be bugs and issues. If you've never used Elastic Beanstalk before, please hold off before trying this option. - -On the other hand, we need help cleaning this up. If you do have knowledge of Elastic Beanstalk, we would appreciate the help. :) - -Prerequisites -------------- - -* awsebcli - -Instructions -------------- - -If you haven't done so, create a directory of environments:: - - eb init -p python3.4 MY_PROJECT_SLUG - # Warning: If you use python3.6, you will run into problems later due to some incompatibility with - # mod_wgsi 3.5 (packaged in 64bit Amazon Linux 2017.09 v2.6.1 running Python 3.6). See: - # https://serverfault.com/questions/884469/mod-wsgi-call-to-site-addsitedir-failed-on-aws-elastic-beanstalk-python-3/885445 - -Replace `MY_PROJECT_SLUG` with the value you entered for `project_slug`. - -Once that is done, create the environment (server) where the app will run:: - - eb create MY_PROJECT_SLUG - # Note: This will eventually fail on a postgres error, because postgres doesn't exist yet - -Now make sure you are in the right environment:: - - eb list - -If you are not in the right environment, then put yourself in the correct one:: - - eb use MY_PROJECT_SLUG - -Set the environment variables. Notes: You will be prompted if the `.env` file is missing. The script will ignore any PostgreSQL values, as RDS uses it's own system:: - - # Set the environment variables - python ebsetenv.py - -Speaking of PostgreSQL, go to the Elasting Beanstalk configuration panel for RDS. Create new RDS database, with these attributes: - -* PostgreSQL -* Version 9.4.9 -* Size db.t2.micro (You can upgrade later) - -(Get some coffee, this is going to take a while) - -Once you have a database specified, deploy again so your instance can pick up the new PostgreSQL values:: - - eb deploy - -Take a look:: - - eb open - -FAQ ------ - -Why Not Use Docker on Elastic Beanstalk? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). - -Why Can't I Use Both Docker/Heroku with Elastic Beanstalk? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Because the environment variables that our Docker and Heroku setups use for PostgreSQL access is different then how Amazon RDS handles this access. At this time we're just trying to get things to work reliably with Elastic Beanstalk, and full integration will come later. diff --git a/docs/index.rst b/docs/index.rst index 3b0a268c..41a1138f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,7 +25,6 @@ Contents: faq troubleshooting my-favorite-cookie - deployment-with-elastic-beanstalk Indices and tables ================== diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b383e419..6a9df04f 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -12,6 +12,7 @@ A portion of this code was adopted from Django's standard crypto functions and utilities, specifically: https://github.com/django/django/blob/master/django/utils/crypto.py """ +from __future__ import print_function import os import random import shutil @@ -119,8 +120,6 @@ def remove_heroku_files(): Removes files needed for heroku if it isn't going to be used """ filenames = ["Procfile", "runtime.txt"] - if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': - filenames.append("requirements.txt") for filename in ["Procfile", "runtime.txt"]: file_name = os.path.join(PROJECT_DIRECTORY, filename) remove_file(file_name) @@ -130,7 +129,7 @@ def remove_docker_files(): """ Removes files needed for docker if it isn't going to be used """ - for filename in ["local.yml", "production.yml", ".dockerignore"]: + for filename in ["dev.yml", "docker-compose.yml", ".dockerignore"]: os.remove(os.path.join( PROJECT_DIRECTORY, filename )) @@ -167,6 +166,14 @@ def remove_packageJSON_file(): PROJECT_DIRECTORY, filename )) +def remove_certbot_files(): + """ + Removes files needed for certbot if it isn't going to be used + """ + nginx_dir_location = os.path.join(PROJECT_DIRECTORY, 'compose/nginx') + for filename in ["nginx-secure.conf", "start.sh", "dhparams.example.pem"]: + file_name = os.path.join(nginx_dir_location, filename) + remove_file(file_name) def remove_copying_files(): """ @@ -177,31 +184,6 @@ def remove_copying_files(): PROJECT_DIRECTORY, filename )) -def remove_elasticbeanstalk(): - """ - Removes elastic beanstalk components - """ - docs_dir_location = os.path.join(PROJECT_DIRECTORY, '.ebextensions') - if os.path.exists(docs_dir_location): - shutil.rmtree(docs_dir_location) - - filenames = ["ebsetenv.py", ] - if '{{ cookiecutter.use_heroku }}'.lower() != 'y': - filenames.append("requirements.txt") - for filename in filenames: - os.remove(os.path.join( - PROJECT_DIRECTORY, filename - )) - -def remove_open_source_files(): - """ - Removes files conventional to opensource projects only. - """ - for filename in ["CONTRIBUTORS.txt"]: - os.remove(os.path.join( - PROJECT_DIRECTORY, filename - )) - # IN PROGRESS # def copy_doc_files(project_directory): @@ -221,26 +203,26 @@ def remove_open_source_files(): # dst = os.path.join(target_dir, name) # shutil.copyfile(src, dst) -# Generates and saves random secret key +# 1. Generates and saves random secret key make_secret_key(PROJECT_DIRECTORY) -# Removes the taskapp if celery isn't going to be used +# 2. Removes the taskapp if celery isn't going to be used if '{{ cookiecutter.use_celery }}'.lower() == 'n': remove_task_app(PROJECT_DIRECTORY) -# Removes the .idea directory if PyCharm isn't going to be used +# 3. Removes the .idea directory if PyCharm isn't going to be used if '{{ cookiecutter.use_pycharm }}'.lower() != 'y': remove_pycharm_dir(PROJECT_DIRECTORY) -# Removes all heroku files if it isn't going to be used +# 4. Removes all heroku files if it isn't going to be used if '{{ cookiecutter.use_heroku }}'.lower() != 'y': remove_heroku_files() -# Removes all docker files if it isn't going to be used +# 5. Removes all docker files if it isn't going to be used if '{{ cookiecutter.use_docker }}'.lower() != 'y': remove_docker_files() -# Removes all JS task manager files if it isn't going to be used +# 6. Removes all JS task manager files if it isn't going to be used if '{{ cookiecutter.js_task_runner}}'.lower() == 'gulp': remove_grunt_files() elif '{{ cookiecutter.js_task_runner}}'.lower() == 'grunt': @@ -250,7 +232,11 @@ else: remove_grunt_files() remove_packageJSON_file() -# Display a warning if use_docker and use_grunt are selected. Grunt isn't +# 7. Removes all certbot/letsencrypt files if it isn't going to be used +if '{{ cookiecutter.use_lets_encrypt }}'.lower() != 'y': + remove_certbot_files() + +# 8. Display a warning if use_docker and use_grunt are selected. Grunt isn't # supported by our docker config atm. if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt', 'gulp'] and '{{ cookiecutter.use_docker }}'.lower() == 'y': print( @@ -259,15 +245,21 @@ if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt', 'gulp'] and '{{ cook "js task runner service to your docker configuration manually." ) +# 9. Removes the certbot/letsencrypt files and display a warning if use_lets_encrypt is selected and use_docker isn't. +if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() != 'y': + remove_certbot_files() + print( + "You selected to use Let's Encrypt and didn't select to use docker. This is NOT supported out of the box for now. You " + "can continue to use the project like you normally would, but Let's Encrypt files have been included." + ) -# Removes files needed for the GPLv3 licence if it isn't going to be used. +# 10. Directs the user to the documentation if certbot and docker are selected. +if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() == 'y': + print( + "You selected to use Let's Encrypt, please see the documentation for instructions on how to use this in production. " + "You must generate a dhparams.pem file before running docker-compose in a production environment." + ) + +# 11. Removes files needed for the GPLv3 licence if it isn't going to be used. if '{{ cookiecutter.open_source_license}}' != 'GPLv3': remove_copying_files() - -# Remove Elastic Beanstalk files -if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': - remove_elasticbeanstalk() - -# Remove files conventional to opensource projects only. -if '{{ cookiecutter.open_source_license }}' == 'Not open source': - remove_open_source_files() diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index c7a68450..5f2c9d5d 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -3,13 +3,9 @@ project_slug = '{{ cookiecutter.project_slug }}' if hasattr(project_slug, 'isidentifier'): assert project_slug.isidentifier(), 'Project slug should be valid Python identifier!' -elasticbeanstalk = '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() heroku = '{{ cookiecutter.use_heroku }}'.lower() docker = '{{ cookiecutter.use_docker }}'.lower() -if elasticbeanstalk == 'y' and (heroku == 'y' or docker == 'y'): - raise Exception("Cookiecutter Django's EXPERIMENTAL Elastic Beanstalk support is incompatible with Heroku and Docker setups.") - if docker == 'n': import sys @@ -26,6 +22,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/setup.py b/setup.py index a300dc7f..eb5856e6 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.11.8' +version = '1.11.9' if sys.argv[-1] == 'tag': os.system('git tag -a %s -m "version %s"' % (version, version)) diff --git a/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config deleted file mode 100644 index 136be533..00000000 --- a/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config +++ /dev/null @@ -1,7 +0,0 @@ -packages: - yum: - git: [] - postgresql94-devel: [] - libjpeg-turbo-devel: [] - libffi: [] - libffi-devel: [] diff --git a/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config b/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config deleted file mode 100644 index 26c059e3..00000000 --- a/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config +++ /dev/null @@ -1,46 +0,0 @@ -#This sample requires you to create a separate configuration file that defines the custom -# option settings for CacheCluster properties. - -Resources: - MyCacheSecurityGroup: - Type: "AWS::EC2::SecurityGroup" - Properties: - GroupDescription: "Lock cache down to webserver access only" - SecurityGroupIngress : - - IpProtocol : "tcp" - FromPort : - Fn::GetOptionSetting: - OptionName : "CachePort" - DefaultValue: "6379" - ToPort : - Fn::GetOptionSetting: - OptionName : "CachePort" - DefaultValue: "6379" - SourceSecurityGroupName: - Ref: "AWSEBSecurityGroup" - MyElastiCache: - Type: "AWS::ElastiCache::CacheCluster" - Properties: - CacheNodeType: - Fn::GetOptionSetting: - OptionName : "CacheNodeType" - DefaultValue : "cache.t2.micro" - NumCacheNodes: - Fn::GetOptionSetting: - OptionName : "NumCacheNodes" - DefaultValue : "1" - Engine: - Fn::GetOptionSetting: - OptionName : "Engine" - DefaultValue : "redis" - VpcSecurityGroupIds: - - - Fn::GetAtt: - - MyCacheSecurityGroup - - GroupId - -Outputs: - ElastiCache: - Description : "ID of ElastiCache Cache Cluster with Redis Engine" - Value : - Ref : "MyElastiCache" diff --git a/{{cookiecutter.project_slug}}/.ebextensions/30_options.config b/{{cookiecutter.project_slug}}/.ebextensions/30_options.config deleted file mode 100644 index fefec489..00000000 --- a/{{cookiecutter.project_slug}}/.ebextensions/30_options.config +++ /dev/null @@ -1,6 +0,0 @@ -option_settings: - "aws:elasticbeanstalk:customoption": - CacheNodeType : cache.t2.micro - NumCacheNodes : 1 - Engine : redis - CachePort : 6379 diff --git a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config deleted file mode 100644 index 03b91eb4..00000000 --- a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config +++ /dev/null @@ -1,17 +0,0 @@ -container_commands: - 01_migrate: - command: "source /opt/python/run/venv/bin/activate && python manage.py migrate --noinput" - leader_only: True - 02_collectstatic: - command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput" -option_settings: - "aws:elasticbeanstalk:application:environment": - DJANGO_SETTINGS_MODULE: "config.settings.production" - REDIS_ENDPOINT_ADDRESS: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Address"]}`' - REDIS_PORT: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Port"]}`' - "aws:elasticbeanstalk:container:python": - WSGIPath: config/wsgi.py - NumProcesses: 3 - NumThreads: 20 - "aws:elasticbeanstalk:container:python:staticfiles": - "/static/": "www/static/" diff --git a/{{cookiecutter.project_slug}}/.ebextensions/50_apache.config b/{{cookiecutter.project_slug}}/.ebextensions/50_apache.config deleted file mode 100644 index 672cb625..00000000 --- a/{{cookiecutter.project_slug}}/.ebextensions/50_apache.config +++ /dev/null @@ -1,3 +0,0 @@ -container_commands: - 01_setup_apache: - command: "cp .ebextensions/enable_mod_deflate.conf /etc/httpd/conf.d/enable_mod_deflate.conf" diff --git a/{{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf b/{{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf deleted file mode 100644 index 7a77cc23..00000000 --- a/{{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf +++ /dev/null @@ -1,25 +0,0 @@ -# mod_deflate configuration - - # Restrict compression to these MIME types - AddOutputFilterByType DEFLATE text/plain - AddOutputFilterByType DEFLATE text/html - AddOutputFilterByType DEFLATE application/xhtml+xml - AddOutputFilterByType DEFLATE text/xml - AddOutputFilterByType DEFLATE application/xml - AddOutputFilterByType DEFLATE application/xml+rss - AddOutputFilterByType DEFLATE application/x-javascript - AddOutputFilterByType DEFLATE text/javascript - AddOutputFilterByType DEFLATE text/css - # Level of compression (Highest 9 - Lowest 1) - DeflateCompressionLevel 9 - # Netscape 4.x has some problems. - BrowserMatch ^Mozilla/4 gzip-only-text/html - # Netscape 4.06-4.08 have some more problems - BrowserMatch ^Mozilla/4\.0[678] no-gzip - # MSIE masquerades as Netscape, but it is fine - BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html - - # Make sure proxies don't deliver the wrong content - Header append Vary User-Agent env=!dont-vary - - diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index c4bf9fe3..06dd82ed 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -132,16 +132,7 @@ See detailed `cookiecutter-django Docker documentation`_. .. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html {% endif %} -{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' %} -Elastic Beanstalk -~~~~~~~~~~~~~~~~~~ - -See detailed `cookiecutter-django Elastic Beanstalk documentation`_. - -.. _`cookiecutter-django Elastic Beanstalk documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html - -{% endif %} {% if cookiecutter.custom_bootstrap_compilation == "y" %} Custom Bootstrap Compilation ^^^^^^ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index db581306..33542fbf 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -172,36 +172,17 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [ {% set _DEFAULT_CONN_MAX_AGE=60 %} # DATABASE CONFIGURATION # ------------------------------------------------------------------------------ -{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} -# Uses Amazon RDS for database hosting, which doesn't follow the Heroku-style spec -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': env('RDS_DB_NAME'), - 'USER': env('RDS_USERNAME'), - '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 # ------------------------------------------------------------------------------ -{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} -REDIS_LOCATION = 'redis://{}:{}/0'.format( - env('REDIS_ENDPOINT_ADDRESS'), - env('REDIS_PORT') -) -{% else %} REDIS_LOCATION = '{0}/{1}'.format(env('REDIS_URL', default='redis://127.0.0.1:6379'), 0) -{%- endif %} + # Heroku URL does not pass the DB number, so we parse it in CACHES = { 'default': { diff --git a/{{cookiecutter.project_slug}}/ebsetenv.py b/{{cookiecutter.project_slug}}/ebsetenv.py deleted file mode 100644 index ba9652db..00000000 --- a/{{cookiecutter.project_slug}}/ebsetenv.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Converts a .env file to Elastic Beanstalk environment variables""" - -import os -from sys import exit -from subprocess import check_call - -try: - import dotenv -except ImportError: - print("Please install the 'dotenv' library: 'pip install dotenv'") - exit() - -def main(): - if not os.path.exists('.env'): - print('ERROR!! .env file is missing!') - print("Please copy 'env.example' to '.env' and add appropriate values") - exit() - command = ['eb', 'setenv'] - failures = [] - for key, value in dotenv.Dotenv('.env').items(): - if key.startswith('POSTGRES'): - print('Skipping POSTGRES values - Amazon RDS provides these') - continue - if value: - command.append("{}={}".format(key, value)) - else: - failures.append(key) - if failures: - for failure in failures: - print("{} requires a value".format(failure)) - else: - print(' '.join(command)) - check_call(command) - - -if __name__ == '__main__': - main() From ea8e70a362e56e491639bfc7dab820fc1cd99e2c Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 15 Jan 2018 12:43:34 -0800 Subject: [PATCH 18/39] Update the README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 35a8bc42..eb6fac6f 100644 --- a/README.rst +++ b/README.rst @@ -220,7 +220,7 @@ Community .. _`issue`: https://github.com/pydanny/cookiecutter-django/issues .. _`Gitter`: https://gitter.im/pydanny/cookiecutter-django?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge -For Readers of Two Scoops of Django 1.8 +For Readers of Two Scoops of Django -------------------------------------------- You may notice that some elements of this project do not exactly match what we describe in chapter 3. The reason for that is this project, amongst other things, serves as a test bed for trying out new ideas and concepts. Sometimes they work, sometimes they don't, but the end result is that it won't necessarily match precisely what is described in the book I co-authored. From 2c0d5cfc9e84bb6238c2c497364f97a2ab52596c Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Mon, 15 Jan 2018 12:51:24 -0800 Subject: [PATCH 19/39] Updated README --- README.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index eb6fac6f..b8ecc035 100644 --- a/README.rst +++ b/README.rst @@ -272,14 +272,21 @@ experience better. Articles --------- +* `Deploying Cookiecutter-Django with Docker-Compose`_ - Oct. 19, 2017 +* `Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`_ - May 19, 2017 +* `Exploring with Cookiecutter`_ - Dec. 3, 2016 +* `Introduction to Cookiecutter-Django`_ - Feb. 19, 2016 +* `Django and GitLab - Running Continuous Integration and tests with your FREE account`_ - May. 11, 2016 * `Development and Deployment of Cookiecutter-Django on Fedora`_ - Jan. 18, 2016 * `Development and Deployment of Cookiecutter-Django via Docker`_ - Dec. 29, 2015 * `How to create a Django Application using Cookiecutter and Django 1.8`_ - Sept. 12, 2015 -* `Introduction to Cookiecutter-Django`_ - Feb. 19, 2016 -* `Django and GitLab - Running Continuous Integration and tests with your FREE account`_ - May. 11, 2016 Have a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link. +.. _`Deploying Cookiecutter-Django with Docker-Compose`: http://adamantine.me/2017/10/19/deploying-cookiecutter-django-with-docker-compose/ +.. _`Exploring with Cookiecutter`: http://www.snowboardingcoder.com/django/2016/12/03/exploring-with-cookiecutter/ +.. _`Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`: https://joshuahunter.com/posts/using-cookiecutter-to-jumpstart-a-django-project-on-windows-with-pycharm/ + .. _`Development and Deployment of Cookiecutter-Django via Docker`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-via-docker/ .. _`Development and Deployment of Cookiecutter-Django on Fedora`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-on-fedora/ .. _`How to create a Django Application using Cookiecutter and Django 1.8`: https://www.swapps.io/blog/how-to-create-a-django-application-using-cookiecutter-and-django-1-8/ From 1cb960551193e9a09a3c9a93e76b5e3a0d76cd3c Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Mon, 15 Jan 2018 14:05:27 -0800 Subject: [PATCH 20/39] Remove old lets_encrypt stuff that was breaking tests --- hooks/post_gen_project.py | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 6a9df04f..bffa783f 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -166,15 +166,6 @@ def remove_packageJSON_file(): PROJECT_DIRECTORY, filename )) -def remove_certbot_files(): - """ - Removes files needed for certbot if it isn't going to be used - """ - nginx_dir_location = os.path.join(PROJECT_DIRECTORY, 'compose/nginx') - for filename in ["nginx-secure.conf", "start.sh", "dhparams.example.pem"]: - file_name = os.path.join(nginx_dir_location, filename) - remove_file(file_name) - def remove_copying_files(): """ Removes files needed for the GPLv3 licence if it isn't going to be used @@ -232,11 +223,8 @@ else: remove_grunt_files() remove_packageJSON_file() -# 7. Removes all certbot/letsencrypt files if it isn't going to be used -if '{{ cookiecutter.use_lets_encrypt }}'.lower() != 'y': - remove_certbot_files() -# 8. Display a warning if use_docker and use_grunt are selected. Grunt isn't +# 9. Display a warning if use_docker and use_grunt are selected. Grunt isn't # supported by our docker config atm. if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt', 'gulp'] and '{{ cookiecutter.use_docker }}'.lower() == 'y': print( @@ -245,21 +233,6 @@ if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt', 'gulp'] and '{{ cook "js task runner service to your docker configuration manually." ) -# 9. Removes the certbot/letsencrypt files and display a warning if use_lets_encrypt is selected and use_docker isn't. -if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() != 'y': - remove_certbot_files() - print( - "You selected to use Let's Encrypt and didn't select to use docker. This is NOT supported out of the box for now. You " - "can continue to use the project like you normally would, but Let's Encrypt files have been included." - ) - -# 10. Directs the user to the documentation if certbot and docker are selected. -if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use_docker }}'.lower() == 'y': - print( - "You selected to use Let's Encrypt, please see the documentation for instructions on how to use this in production. " - "You must generate a dhparams.pem file before running docker-compose in a production environment." - ) - -# 11. Removes files needed for the GPLv3 licence if it isn't going to be used. +# 10. Removes files needed for the GPLv3 licence if it isn't going to be used. if '{{ cookiecutter.open_source_license}}' != 'GPLv3': remove_copying_files() From e69ceebfc584373bfec446033dd1de2fa48560fe Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Tue, 16 Jan 2018 22:06:28 -0800 Subject: [PATCH 21/39] Possible fix for --- hooks/post_gen_project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index bffa783f..cfe2df12 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -130,9 +130,9 @@ def remove_docker_files(): Removes files needed for docker if it isn't going to be used """ for filename in ["dev.yml", "docker-compose.yml", ".dockerignore"]: - os.remove(os.path.join( - PROJECT_DIRECTORY, filename - )) + filename = os.path.join(PROJECT_DIRECTORY, filename) + if os.path.exists(filename): + os.remove(filename) shutil.rmtree(os.path.join( PROJECT_DIRECTORY, "compose" From cc888d89a8326fab44be245397491b667fc81369 Mon Sep 17 00:00:00 2001 From: Reggie Riser Date: Wed, 17 Jan 2018 13:13:09 -0500 Subject: [PATCH 22/39] Fixed old docker-compose filenames (#1457) --- hooks/post_gen_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index cfe2df12..9a6da7b6 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -129,7 +129,7 @@ def remove_docker_files(): """ Removes files needed for docker if it isn't going to be used """ - for filename in ["dev.yml", "docker-compose.yml", ".dockerignore"]: + for filename in ["local.yml", "production.yml", ".dockerignore"]: filename = os.path.join(PROJECT_DIRECTORY, filename) if os.path.exists(filename): os.remove(filename) From af12f39996459dcf9e6ed8bc6d4304a7f932e37a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 21 Jan 2018 01:05:12 +0000 Subject: [PATCH 23/39] Improve custom_bootstrap_compilation option (#1429) * Add Bootstrap to package.json in case of custom_bootstrap_compilation * Update JS task runners and base HTML to handle custom scss compilation * Generate a vendors.js with custom bootstrap compilation + Gulp * Update documentation accordingly * Add missing if/endif in gulpfile * Update to Bootstrap v4 final --- docs/project-generation-options.rst | 4 +- {{cookiecutter.project_slug}}/Gruntfile.js | 4 +- {{cookiecutter.project_slug}}/README.rst | 12 ++++- {{cookiecutter.project_slug}}/gulpfile.js | 41 +++++++++++++-- {{cookiecutter.project_slug}}/package.json | 19 +++++++ .../static/sass/project.scss | 50 +------------------ .../templates/base.html | 13 +++++ 7 files changed, 85 insertions(+), 58 deletions(-) diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 5a0cffe6..d1d36324 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -73,7 +73,9 @@ js_task_runner [1] 3. None custom_bootstrap_compilation [n] - If you use Grunt, scaffold out recompiling Bootstrap as as task. (Useful for letting you change Bootstrap variables in real time.) Consult project README for more details. + Scaffold out recompiling Bootstrap as as task, with Gulp_ or Grunt_. + Useful for letting you change Bootstrap variables in real time. + Consult project README for more details. open_source_license [1] Select a software license for the project. The choices are: diff --git a/{{cookiecutter.project_slug}}/Gruntfile.js b/{{cookiecutter.project_slug}}/Gruntfile.js index 6900c4e0..15384c67 100644 --- a/{{cookiecutter.project_slug}}/Gruntfile.js +++ b/{{cookiecutter.project_slug}}/Gruntfile.js @@ -61,7 +61,7 @@ module.exports = function (grunt) { options: { outputStyle: 'nested', {% if cookiecutter.custom_bootstrap_compilation == 'y' %} - includePaths: ['bower_components/bootstrap-sass/assets/stylesheets/bootstrap/'], + includePaths: ['node_modules/bootstrap/scss'], {% endif %} sourceMap: false, precision: 10 @@ -74,7 +74,7 @@ module.exports = function (grunt) { options: { outputStyle: 'compressed', {% if cookiecutter.custom_bootstrap_compilation == 'y' %} - includePaths: ['bower_components/bootstrap-sass/assets/stylesheets/bootstrap/'], + includePaths: ['node_modules/bootstrap/scss'], {% endif %} sourceMap: false, precision: 10 diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 06dd82ed..dc3495d5 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -137,8 +137,16 @@ See detailed `cookiecutter-django Docker documentation`_. Custom Bootstrap Compilation ^^^^^^ -To get automatic Bootstrap recompilation with variables of your choice, install bootstrap sass (`bower install bootstrap-sass`) and tweak your variables in `static/sass/custom_bootstrap_vars`. +The generated CSS is set up with automatic Bootstrap recompilation with variables of your choice. +Bootstrap v4 is installed using npm and customised by tweaking your variables in ``static/sass/custom_bootstrap_vars``. -(You can find a list of available variables [in the bootstrap-sass source](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss), or get explanations on them in the [Bootstrap docs](https://getbootstrap.com/customize/).) +You can find a list of available variables `in the bootstrap source`_, or get explanations on them in the `Bootstrap docs`_. + +{% if cookiecutter.js_task_runner == 'Gulp' %} +Bootstrap's javascript as well as its dependencies is concatenated into a single file: ``static/js/vendors.js``. +{% endif %} + +.. _in the bootstrap source: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss +.. _Bootstrap docs: https://getbootstrap.com/docs/4.0/getting-started/theming/ {% endif %} diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 594fa090..bb18a535 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -10,6 +10,9 @@ var gulp = require('gulp'), sass = require('gulp-sass'), autoprefixer = require('gulp-autoprefixer'), cssnano = require('gulp-cssnano'), + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + concat = require('gulp-concat'), + {% endif %} rename = require('gulp-rename'), del = require('del'), plumber = require('gulp-plumber'), @@ -25,15 +28,24 @@ var gulp = require('gulp'), // Relative paths function var pathsConfig = function (appName) { this.app = "./" + (appName || pjson.name); + var vendorsRoot = 'node_modules/'; return { + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + bootstrapSass: vendorsRoot + '/bootstrap/scss', + vendorsJs: [ + vendorsRoot + 'jquery/dist/jquery.slim.js', + vendorsRoot + 'popper.js/dist/umd/popper.js', + vendorsRoot + 'bootstrap/dist/js/bootstrap.js' + ], + {% endif %} app: this.app, templates: this.app + '/templates', css: this.app + '/static/css', sass: this.app + '/static/sass', fonts: this.app + '/static/fonts', images: this.app + '/static/images', - js: this.app + '/static/js', + js: this.app + '/static/js' } }; @@ -45,8 +57,15 @@ var paths = pathsConfig(); // Styles autoprefixing and minification gulp.task('styles', function() { - return gulp.src(paths.sass + '/*.scss') - .pipe(sass().on('error', sass.logError)) + return gulp.src(paths.sass + '/project.scss') + .pipe(sass({ + includePaths: [ + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + paths.bootstrapSass, + {% endif %} + paths.sass + ] + }).on('error', sass.logError)) .pipe(plumber()) // Checks for errors .pipe(autoprefixer({browsers: ['last 2 versions']})) // Adds vendor prefixes .pipe(pixrem()) // add fallbacks for rem units @@ -65,6 +84,20 @@ gulp.task('scripts', function() { .pipe(gulp.dest(paths.js)); }); + +{% if cookiecutter.custom_bootstrap_compilation == 'y' %} +// Vendor Javascript minification +gulp.task('vendor-scripts', function() { + return gulp.src(paths.vendorsJs) + .pipe(concat('vendors.js')) + .pipe(gulp.dest(paths.js)) + .pipe(plumber()) // Checks for errors + .pipe(uglify()) // Minifies the js + .pipe(rename({ suffix: '.min' })) + .pipe(gulp.dest(paths.js)); +}); +{% endif %} + // Image compression gulp.task('imgCompression', function(){ return gulp.src(paths.images + '/*') @@ -101,5 +134,5 @@ gulp.task('watch', function() { // Default task gulp.task('default', function() { - runSequence(['styles', 'scripts', 'imgCompression'], ['runServer', 'browserSync', 'watch']); + runSequence(['styles', 'scripts', {% if cookiecutter.custom_bootstrap_compilation == 'y' %}'vendor-scripts', {% endif %}'imgCompression'], ['runServer', 'browserSync', 'watch']); }); diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index 0c8af427..a37d73bf 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -5,6 +5,9 @@ "devDependencies": { {% if cookiecutter.js_task_runner == 'Grunt' %} "autoprefixer-core": "~5.2.1", + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + "bootstrap": "^4.0.0", + {% endif %} "connect-livereload": "~0.3.2", "cssnano": "~2.1.0", "grunt": "~0.4.5", @@ -12,14 +15,26 @@ "grunt-contrib-watch": "~0.6.1", "grunt-postcss": "~0.5.5", "grunt-sass": "~1.0.0", + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + "jquery": "^3.2.1-slim", + {% endif %} "load-grunt-tasks": "~3.2.0", "pixrem": "~1.3.1", + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + "popper.js": "^1.12.3", + {% endif %} "time-grunt": "~1.2.1" {% elif cookiecutter.js_task_runner == 'Gulp' %} + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + "bootstrap": "^4.0.0", + {% endif %} "browser-sync": "^2.14.0", "del": "^2.2.2", "gulp": "^3.9.1", "gulp-autoprefixer": "^3.1.1", + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + "gulp-concat": "^2.6.1", + {% endif %} "gulp-cssnano": "^2.1.2", "gulp-imagemin": "^3.0.3", "gulp-pixrem": "^1.0.0", @@ -28,6 +43,10 @@ "gulp-sass": "^2.3.2", "gulp-uglify": "^2.0.0", "gulp-util": "^3.0.7", + {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + "jquery": "^3.2.1-slim", + "popper.js": "^1.12.3", + {% endif %} "run-sequence": "^1.2.2" {% endif %} }, diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/sass/project.scss b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/sass/project.scss index 6e701f29..3ba2e55a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/sass/project.scss +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/sass/project.scss @@ -1,54 +1,6 @@ {% if cookiecutter.custom_bootstrap_compilation == 'y' %} -@import "variables"; @import "custom_bootstrap_vars"; -@import "mixins"; - -// Reset and dependencies -@import "normalize"; -@import "print"; -@import "glyphicons"; - -// Core CSS -@import "scaffolding"; -@import "type"; -@import "code"; -@import "grid"; -@import "tables"; -@import "forms"; -@import "buttons"; - -// Components -@import "component-animations"; -@import "dropdowns"; -@import "button-groups"; -@import "input-groups"; -@import "navs"; -@import "navbar"; -@import "breadcrumbs"; -@import "pagination"; -@import "pager"; -@import "labels"; -@import "badges"; -@import "jumbotron"; -@import "thumbnails"; -@import "alerts"; -@import "progress-bars"; -@import "media"; -@import "list-group"; -@import "panels"; -@import "responsive-embed"; -@import "wells"; -@import "close"; - -// Components w/ JavaScript -@import "modals"; -@import "tooltip"; -@import "popovers"; -@import "carousel"; - -// Utility classes -@import "utilities"; -@import "responsive-utilities"; +@import "bootstrap"; {% endif %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 6fdc1798..a45de763 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -14,13 +14,19 @@ {% block css %} + {% endraw %}{% if cookiecutter.custom_bootstrap_compilation == "n" %}{% raw %} + {% endraw %}{% endif %}{% raw %} {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %} + {% endraw %}{% if cookiecutter.js_task_runner == "Gulp" %}{% raw %} + + {% endraw %}{% else %}{% raw %} + {% endraw %}{% endif %}{% raw %} {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %} {% endblock %} @@ -88,12 +94,19 @@ ================================================== --> {% block javascript %} + {% endraw %}{% if cookiecutter.custom_bootstrap_compilation == "y" and cookiecutter.js_task_runner == "Gulp" %}{% raw %} + + {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress js %}{% endraw %}{% endif %}{% raw %} + + {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %} + {% endraw %}{% else %}{% raw %} + {% endraw %}{% endif %}{% raw %} {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress js %}{% endraw %}{% endif %}{% raw %} From 3f499f16c377ca9a7626f9e2b7834e2b1a4d3a52 Mon Sep 17 00:00:00 2001 From: Elena Williams Date: Tue, 23 Jan 2018 13:37:53 +1100 Subject: [PATCH 24/39] Update versions and option in README (#1463) Postgres versions had been updated and `custom_bootstrap_complation` had been added in the 'Usage' section. --- README.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index b8ecc035..b4656239 100644 --- a/README.rst +++ b/README.rst @@ -167,16 +167,19 @@ Answer the prompts with your own desired options_. For example:: use_heroku [n]: y use_compressor [n]: y Select postgresql_version: - 1 - 9.5 - 2 - 9.4 - 3 - 9.3 - 4 - 9.2 + 1 - 10 + 2 - 9.6 + 3 - 9.5 + 4 - 9.4 + 5 - 9.3 + 6 - 9.2 Choose from 1, 2, 3, 4 [1]: 1 Select js_task_runner: 1 - Gulp 2 - Grunt 3 - None Choose from 1, 2, 3, 4 [1]: 1 + custom_bootstrap_compilation [n]: n Select open_source_license: 1 - MIT 2 - BSD From ec6dd4fd029bff96ac5003141bdfdad03ee948d2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 23 Jan 2018 16:47:48 +0100 Subject: [PATCH 25/39] Update boto3 from 1.5.14 to 1.5.20 (#1464) --- {{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 79a0cf2b..68815230 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.14 +boto3==1.5.20 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From 2d041b6c4d5ac98ae939ee54e30c91093655f8b1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 23 Jan 2018 16:48:00 +0100 Subject: [PATCH 26/39] Update raven from 6.4.0 to 6.5.0 (#1460) --- {{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 68815230..65cba286 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.4.0 +raven==6.5.0 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From 8e68df4ac460639dc336c8fbe02a041f53c02ba2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 29 Jan 2018 17:06:59 +0100 Subject: [PATCH 27/39] Update factory-boy to 2.10.0 (#1469) * Update factory-boy from 2.9.2 to 2.10.0 * Update factory-boy from 2.9.2 to 2.10.0 --- {{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 2622b778..6a6514ce 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -8,7 +8,7 @@ Sphinx==1.6.6 django-extensions==1.9.9 Werkzeug==0.14.1 django-test-plus==1.0.22 -factory-boy==2.9.2 +factory-boy==2.10.0 django-debug-toolbar==1.9.1 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 01e02c21..6ef082af 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -10,7 +10,7 @@ psycopg2==2.7.3.2 coverage==4.4.2 flake8==3.5.0 # pyup: != 2.6.0 django-test-plus==1.0.22 -factory-boy==2.9.2 +factory-boy==2.10.0 django-coverage-plugin==1.5.0 # pytest From 8a4f3e036b7f2c089e0442cb6d32959291b0c97c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 29 Jan 2018 17:07:10 +0100 Subject: [PATCH 28/39] Update boto3 from 1.5.20 to 1.5.22 (#1468) --- {{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 65cba286..d0d4b52f 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.20 +boto3==1.5.22 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.6.0 From dc8a8a43ca3f0334d9b1d9a7f80ef63957eea127 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 30 Jan 2018 22:55:36 +0000 Subject: [PATCH 29/39] Add Code triage badge [Code triage](https://www.codetriage.com/)is a service that nudge people to help triage issues from OSS they care about. It's picking a random issue from a project people follow and send it to their inbox. --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index b4656239..4fdb7745 100644 --- a/README.rst +++ b/README.rst @@ -12,6 +12,10 @@ Cookiecutter Django .. image:: https://badges.gitter.im/Join Chat.svg :target: https://gitter.im/pydanny/cookiecutter-django?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +.. image:: https://www.codetriage.com/pydanny/cookiecutter-django/badges/users.svg + :target: https://www.codetriage.com/pydanny/cookiecutter-django + :alt: Open Source Helpers + Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. From fe7c4aa815f6fce1e9a79f3449daf232dacc175d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 1 Feb 2018 22:39:04 +0100 Subject: [PATCH 30/39] Update django from 1.11.9 to 1.11.10 (#1474) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 81a375b1..a4c5f483 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -6,7 +6,7 @@ wheel==0.30.0 # Conservative Django -django==1.11.9 # pyup: <2.0 +django==1.11.10 # pyup: <2.0 # Configuration django-environ==0.4.4 From cfbf49f36b4d78e950d3899c1e601ae8604ae4da Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 2 Feb 2018 14:30:20 +0100 Subject: [PATCH 31/39] Update opbeat from 3.6.0 to 3.6.1 (#1473) --- {{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 d0d4b52f..26927029 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -35,5 +35,5 @@ raven==6.5.0 {% if cookiecutter.use_opbeat == "y" -%} # Opbeat agent for performance monitoring # ----------------------------------------- -opbeat==3.6.0 +opbeat==3.6.1 {%- endif %} From e0ac7f9b7383beb0cbb2ec88eacee0ce1c3185a3 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 2 Feb 2018 19:04:24 +0000 Subject: [PATCH 32/39] Adding myself to the core developers list (#1475) --- CONTRIBUTORS.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4cf632db..d5f9bc76 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -7,17 +7,18 @@ Core Developers These contributors have commit flags for the repository, and are able to accept and merge pull requests. -=========================== ============= =========== -Name Github Twitter -=========================== ============= =========== -Daniel Roy Greenfeld `@pydanny`_ @pydanny -Audrey Roy Greenfeld* `@audreyr`_ @audreyr -Fábio C. Barrionuevo da Luz `@luzfcb`_ @luzfcb -Saurabh Kumar `@theskumar`_ @_theskumar +=========================== ================ =========== +Name Github Twitter +=========================== ================ =========== +Daniel Roy Greenfeld `@pydanny`_ @pydanny +Audrey Roy Greenfeld* `@audreyr`_ @audreyr +Fábio C. Barrionuevo da Luz `@luzfcb`_ @luzfcb +Saurabh Kumar `@theskumar`_ @_theskumar Jannis Gebauer `@jayfk`_ -Burhan Khalid `@burhan`_ @burhan -Shupeyko Nikita `@webyneter`_ @webyneter -=========================== ============= =========== +Burhan Khalid `@burhan`_ @burhan +Shupeyko Nikita `@webyneter`_ @webyneter +Bruno Alla               `@browniebroke`_ @_BrunoAlla +=========================== ================ =========== *Audrey is also the creator of Cookiecutter. Audrey and Daniel are on the Cookiecutter core team.* @@ -28,6 +29,7 @@ Daniel are on the Cookiecutter core team.* .. _@audreyr: https://github.com/audreyr .. _@jayfk: https://github.com/jayfk .. _@webyneter: https://github.com/webyneter +.. _@browniebroke: https://github.com/browniebroke Other Contributors ------------------ @@ -64,7 +66,6 @@ Listed in alphabetical order. Bo Lopker `@blopker`_ Bouke Haarsma Brent Payne `@brentpayne`_ @brentpayne - Bruno Alla               `@browniebroke`_ @_BrunoAlla Burhan Khalid            `@burhan`_                   @burhan Catherine Devlin `@catherinedevlin`_ Cédric Gaspoz `@cgaspoz`_ @@ -171,7 +172,6 @@ Listed in alphabetical order. .. _@bloodpet: https://github.com/bloodpet .. _@blopker: https://github.com/blopker .. _@bogdal: https://github.com/bogdal -.. _@browniebroke: https://github.com/browniebroke .. _@burhan: https://github.com/burhan .. _@c-rhodes: https://github.com/c-rhodes .. _@caffodian: https://github.com/caffodian @@ -228,7 +228,6 @@ Listed in alphabetical order. .. _@rm--: https://github.com/rm-- .. _@romanosipenko: https://github.com/romanosipenko .. _@shireenrao: https://github.com/shireenrao -.. _@webyneter: https://github.com/webyneter .. _@show0k: https://github.com/show0k .. _@sfdye: https://github.com/sfdye .. _@shultz: https://github.com/shultz From a191f54c9bb0e362ce7ef6317ae54e1436d3ee71 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 2 Feb 2018 19:18:06 +0000 Subject: [PATCH 33/39] Fix a few broken links in the contributors list --- CONTRIBUTORS.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index d5f9bc76..a9a85773 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -239,7 +239,7 @@ Listed in alphabetical order. .. _@timfreund: https://github.com/timfreund .. _@Travistock: https://github.com/Tavistock .. _@trungdong: https://github.com/trungdong -.. _@viviangb: httpsL//github.com/viviangb +.. _@viviangb: https://github.com/viviangb .. _@xpostudio4: https://github.com/xpostudio4 .. _@yunti: https://github.com/yunti .. _@zcho: https://github.com/zcho @@ -249,6 +249,12 @@ Listed in alphabetical order. .. _@jangeador: https://github.com/jangeador .. _@townie: https://github.com/townie .. _@MightySCollins: https://github.com/MightySCollins +.. _@dadokkio: https://github.com/dadokkio +.. _@bwarren2: https://github.com/bwarren2 +.. _@bertdemiranda: https://github.com/bertdemiranda +.. _@brentpayne: https://github.com/brentpayne +.. _@afrowave: https://github.com/afrowave +.. _@pchiquet: https://github.com/pchiquet Special Thanks ~~~~~~~~~~~~~~ From b19b1e0f3c9f099e07d0d013b9e3432d18937efb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 2 Feb 2018 21:43:02 +0100 Subject: [PATCH 34/39] Update django-allauth from 0.34.0 to 0.35.0 (#1477) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index a4c5f483..b2595156 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -29,7 +29,7 @@ argon2-cffi==18.1.0 # For user registration, either via email or social # Well-built with regular release cycles! -django-allauth==0.34.0 +django-allauth==0.35.0 {% if cookiecutter.windows == 'y' -%} # On Windows, you must download/install psycopg2 manually From 4b7a70d8753a058e3d120656dfdaaf8567dc46ab Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 2 Feb 2018 21:54:07 +0100 Subject: [PATCH 35/39] Update django-anymail from 1.2 to 1.3 (#1478) --- {{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 26927029..15740618 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,7 +24,7 @@ Collectfast==0.6.0 # Email backends for Mailgun, Postmark, SendGrid and more # ------------------------------------------------------- -django-anymail==1.2 +django-anymail==1.3 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client From b24d0d0bd889a50ab042c140b77d22538279355f Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Feb 2018 22:01:28 +0100 Subject: [PATCH 36/39] Fixes wsgi.py app_path to avoid deleting all /config occurrences. (#1467) --- {{cookiecutter.project_slug}}/config/wsgi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/wsgi.py b/{{cookiecutter.project_slug}}/config/wsgi.py index 601d27c6..5f49644c 100644 --- a/{{cookiecutter.project_slug}}/config/wsgi.py +++ b/{{cookiecutter.project_slug}}/config/wsgi.py @@ -20,7 +20,8 @@ from django.core.wsgi import get_wsgi_application # This allows easy placement of apps within the interior # {{ cookiecutter.project_slug }} directory. -app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '') +app_path = os.path.abspath(os.path.join( + os.path.dirname(os.path.abspath(__file__)), os.pardir)) sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}')) {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%} From b66d7a4f04324e187cc1a85e41d6a4be6bc8b6bb Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 2 Feb 2018 23:40:42 +0000 Subject: [PATCH 37/39] Rename badge --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 4fdb7745..6536ab7e 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ Cookiecutter Django .. image:: https://www.codetriage.com/pydanny/cookiecutter-django/badges/users.svg :target: https://www.codetriage.com/pydanny/cookiecutter-django - :alt: Open Source Helpers + :alt: Code Helpers Badge Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. From 4f4c51d2bfa90d9d2d013f2e50b561efb33539c9 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 4 Feb 2018 00:26:04 -0800 Subject: [PATCH 38/39] Update coverage from 4.4.2 to 4.5 --- {{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 6a6514ce..fad86434 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.2 +coverage==4.5 django-coverage-plugin==1.5.0 Sphinx==1.6.6 From a0abb0cc222236f4cbbb55cedf07a595b6c0ca50 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 4 Feb 2018 00:26:06 -0800 Subject: [PATCH 39/39] Update coverage from 4.4.2 to 4.5 --- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 6ef082af..b5a8ec98 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.2 +coverage==4.5 flake8==3.5.0 # pyup: != 2.6.0 django-test-plus==1.0.22 factory-boy==2.10.0