From 40cd1fc2ee6344bb8aedbfcc4082671be101dd47 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 15 Aug 2018 11:21:59 +0100 Subject: [PATCH 01/26] Update bug issue template to ask to include the replay file Often, users report issues due to a specific combination of options, which required to get them. The current way is inefficient for users as well as maintainers: - The user needs to copy/paste a terminal output, which might be gone if they closed the window - Maintainer needs to regenerate with the same options - Maintainer needs to be careful to bypass their potential profile defaults - In case of error to one question, needs to re-generate Cookiecutter has got a replay feature for about 3 years now, which seems like a more automated way to get the options from the user. This updates the issue template for bugs report using this. --- .github/ISSUE_TEMPLATE/bug.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 75f6a19c6..2a48c0c32 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -17,7 +17,5 @@ about: Report a bug [//]: # (Any or all of the following:) [//]: # (* Host system configuration: OS, Docker & friends' versions etc.) -[//]: # (* Project generation options) +[//]: # (* Replay file https://cookiecutter.readthedocs.io/en/latest/advanced/replay.html) [//]: # (* Logs) - - From 20931dfb6f34fa80c14ca4596d2c3d3023d44858 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 30 Aug 2018 03:17:42 -0700 Subject: [PATCH 02/26] Update pytest from 3.7.3 to 3.7.4 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5d710316a..6480a96ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.2.1 -pytest==3.7.3 +pytest==3.7.4 pytest-cookies==0.3.0 From 1ffe82dba91f497ac5337a9456b5446abaa31790 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 30 Aug 2018 03:17:44 -0700 Subject: [PATCH 03/26] Update pytest from 3.7.3 to 3.7.4 --- {{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 365d94b01..f9411a03a 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.620 # https://github.com/python/mypy -pytest==3.7.3 # https://github.com/pytest-dev/pytest +pytest==3.7.4 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From cf8287e5763d3057540ac24fe85c422b7d59413c Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 30 Aug 2018 20:15:26 +0100 Subject: [PATCH 04/26] Remove duplicate link to the main cookiecutter repo --- README.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.rst b/README.rst index b5a3e7c0e..4a84b2906 100644 --- a/README.rst +++ b/README.rst @@ -28,8 +28,6 @@ production-ready Django projects quickly. * If you have problems with Cookiecutter Django, please open issues_ don't send emails to the maintainers. -.. _cookiecutter: https://github.com/audreyr/cookiecutter - .. _Troubleshooting: https://cookiecutter-django.readthedocs.io/en/latest/troubleshooting.html .. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 From ebcd5ec09889078efaf1668462744e0d4e1257e0 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 30 Aug 2018 20:34:56 +0100 Subject: [PATCH 05/26] Cleanup outdated references to Grunt - fixes #1721 --- README.rst | 9 ++++----- docs/developing-locally.rst | 4 ++-- {{cookiecutter.project_slug}}/README.rst | 21 +++++++++++++++------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 4a84b2906..b9e71ace2 100644 --- a/README.rst +++ b/README.rst @@ -45,7 +45,7 @@ Features * Optimized development and production settings * Registration via django-allauth_ * Comes with custom user model ready to go -* Grunt build for compass and livereload +* Optional custom static build using Gulp and livereload * Send emails via Anymail_ (using Mailgun_ by default, but switchable) * Media storage using Amazon S3 * Docker support using docker-compose_ for development and production (using Caddy_ with LetsEncrypt_ support) @@ -178,10 +178,9 @@ Answer the prompts with your own desired options_. For example:: 7 - 9.3 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 + 1 - None + 2 - Gulp + Choose from 1, 2 [1]: 1 custom_bootstrap_compilation [n]: n Select open_source_license: 1 - MIT diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 7885f45e8..249969214 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -69,7 +69,7 @@ For instance, one of the packages we depend upon, ``django-allauth`` sends verif Now you have your own mail server running locally, ready to receive whatever you send it. -.. _MailHog: https://github.com/mailhog/MailHog/ +.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases .. _`properly configured`: https://docs.djangoproject.com/en/dev/topics/email/#smtp-backend @@ -90,7 +90,7 @@ Sass Compilation & Live Reloading If you’d like to take advantage of live reloading and Sass / Compass CSS compilation you can do so with a little bit of preparation_. -.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases + .. _preparation: https://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 80923cd88..49df70198 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -95,16 +95,25 @@ 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. -To start the service, make sure you have nodejs installed, and then type the following:: +#. `Download the latest MailHog release`_ for your OS. - $ npm install - $ grunt serve +#. Rename the build to ``MailHog``. -(After the first run you only need to type ``grunt serve``) This will start an email server that listens on ``127.0.0.1:1025`` in addition to starting your Django project and a watch task for live reload. +#. Copy the file to the project root. -To view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025`` +#. Make it executable: :: -The email server will exit when you exit the Grunt task on the CLI with Ctrl+C. + $ chmod +x MailHog + +#. Spin up another terminal window and start it there: :: + + ./MailHog + +#. Check out ``_ to see how it goes. + +Now you have your own mail server running locally, ready to receive whatever you send it. + +.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases {% endif %} .. _mailhog: https://github.com/mailhog/MailHog {% endif %} From 27ae9c36e407559df2e2b892c5e20ee8df546007 Mon Sep 17 00:00:00 2001 From: Irfan Date: Sat, 1 Sep 2018 11:40:57 +0500 Subject: [PATCH 06/26] Fix #1771: Use full-fledge S3 Storage class in production settings sorl-thumbnail serialized and deserializes the storage class and during this process location parameter is lost if factory is used. Using a full-fledge storage class fixes this issue. See: https://stackoverflow.com/a/18046120/104731 --- CONTRIBUTORS.rst | 1 + .../config/settings/production.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index bbbfaf9a8..b3a81e593 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -103,6 +103,7 @@ Listed in alphabetical order. Hendrik Schneider `@hendrikschneider`_ Henrique G. G. Pereira `@ikkebr`_ Ian Lee `@IanLee1521`_ + Irfan Ahmad `@erfaan`_ @erfaan Jan Van Bruggen `@jvanbrug`_ Jens Nilsson `@phiberjenz`_ Jimmy Gitonga `@afrowave`_ @afrowave diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 39df0cbfa..606535d4c 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -97,9 +97,19 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' MEDIA_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/' {%- else %} # region http://stackoverflow.com/questions/10390244/ +# Full-fledge class: https://stackoverflow.com/a/18046120/104731 from storages.backends.s3boto3 import S3Boto3Storage # noqa E402 -StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa -MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media', file_overwrite=False) # noqa + + +class StaticRootS3BotoStorage(S3Boto3Storage): + location = 'static' + + +class MediaRootS3BotoStorage(S3Boto3Storage): + location = 'media' + file_overwrite = False + + # endregion DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage' MEDIA_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/media/' From 5427538dc74a5cbf1c49e62a241f8ed90a756a9b Mon Sep 17 00:00:00 2001 From: Irfan Date: Sat, 1 Sep 2018 11:55:31 +0500 Subject: [PATCH 07/26] Fix contributer github link --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index b3a81e593..2d9d278b6 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -206,6 +206,7 @@ Listed in alphabetical order. .. _@durkode: https://github.com/durkode .. _@epileptic-fish: https://gihub.com/epileptic-fish .. _@eraldo: https://github.com/eraldo +.. _@erfaan: https://github.com/erfaan .. _@eriol: https://github.com/eriol .. _@eyadsibai: https://github.com/eyadsibai .. _@flyudvik: https://github.com/flyudvik From 078c1fb8ba3acf68fdb5ca6476a42e379b1d97ce Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 1 Sep 2018 11:43:07 +0100 Subject: [PATCH 08/26] Remove references to Compass as it's no longer required Also it's no longer maintained: https://github.com/Compass/compass --- docs/developing-locally.rst | 2 +- docs/live-reloading-and-sass-compilation.rst | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 249969214..59079453c 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -88,7 +88,7 @@ In production, we have Mailgun_ configured to have your back! Sass Compilation & Live Reloading --------------------------------- -If you’d like to take advantage of live reloading and Sass / Compass CSS compilation you can do so with a little bit of preparation_. +If you’d like to take advantage of live reloading and Sass compilation you can do so with a little bit of preparation_. .. _preparation: https://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html diff --git a/docs/live-reloading-and-sass-compilation.rst b/docs/live-reloading-and-sass-compilation.rst index e2007cb02..db8d681f2 100644 --- a/docs/live-reloading-and-sass-compilation.rst +++ b/docs/live-reloading-and-sass-compilation.rst @@ -1,24 +1,22 @@ Sass Compilation & Live Reloading ================================= -If you'd like to take advantage of live reloading and Sass / Compass CSS compilation you can do so with a little bit of prep work. +If you'd like to take advantage of `live reload`_ and Sass compilation: -Make sure that nodejs_ is installed. Then in the project root run:: +- Make sure that nodejs_ is installed. Then in the project root run:: $ npm install .. _nodejs: http://nodejs.org/download/ -If you don't already have it, install `compass` (doesn't hurt if you run this command twice):: - - gem install compass - -Now you just need:: +- Now you just need:: $ npm run dev The base app will now run as it would with the usual ``manage.py runserver`` but with live reloading and Sass compilation enabled. +When changing your Sass files, they will be automatically recompiled and change will be reflected in your browser without refreshing. To get live reloading to work you'll probably need to install an `appropriate browser extension`_ +.. _live reload: http://livereload.com/ .. _appropriate browser extension: http://livereload.com/extensions/ From 602bb22a2e959f1a82e8f797b61e76d7d736dab3 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 2 Sep 2018 17:13:35 -0700 Subject: [PATCH 09/26] Update python-slugify to 1.2.6 (#1782) This PR updates [python-slugify](https://pypi.org/project/python-slugify) from **1.2.5** to **1.2.6**.
Changelog ### 1.2.6 ``` - Add support for case sensitive slugs (s-m-e) ```
Links - PyPI: https://pypi.org/project/python-slugify - Changelog: https://pyup.io/changelogs/python-slugify/ - Repo: https://github.com/un33k/python-slugify
--- {{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 510ab3765..928ce679e 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ pytz==2018.5 # https://github.com/stub42/pytz -python-slugify==1.2.5 # https://github.com/un33k/python-slugify +python-slugify==1.2.6 # https://github.com/un33k/python-slugify Pillow==5.2.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} rcssmin==1.0.6{% if cookiecutter.windows == 'y' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin From ff6e58e56034037769bb03309bf8c3a3f1ffc48b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 5 Sep 2018 19:19:59 -0700 Subject: [PATCH 10/26] Update sphinx to 1.7.9 (#1787) This PR updates [Sphinx](https://pypi.org/project/Sphinx) from **1.7.8** to **1.7.9**.
Changelog ### 1.7.9 ``` ===================================== Features added -------------- * 5359: Make generated texinfo files reproducible by sorting the anchors Bugs fixed ---------- * 5361: crashed on incremental build if document uses include directive ```
Links - PyPI: https://pypi.org/project/sphinx - Changelog: https://pyup.io/changelogs/sphinx/ - Homepage: http://sphinx-doc.org/
--- {{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 f9411a03a..e29dab3ff 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==0.14.1 # https://github.com/pallets/werkzeug ipdb==0.11 # https://github.com/gotcha/ipdb -Sphinx==1.7.8 # https://github.com/sphinx-doc/sphinx +Sphinx==1.7.9 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From cd8bab5fdceae1856a3f78b10fa7dbfae9b07e3b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 6 Sep 2018 18:39:20 -0700 Subject: [PATCH 11/26] Update pytest from 3.7.4 to 3.8.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6480a96ca..7cf49ef6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.2.1 -pytest==3.7.4 +pytest==3.8.0 pytest-cookies==0.3.0 From bb837784aef780f9ff2126e168cb4570dda6af53 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 6 Sep 2018 18:39:21 -0700 Subject: [PATCH 12/26] Update pytest from 3.7.4 to 3.8.0 --- {{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 e29dab3ff..6db239e7e 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.620 # https://github.com/python/mypy -pytest==3.7.4 # https://github.com/pytest-dev/pytest +pytest==3.8.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From ffbec778a6fb3b0231755bb40560f4af83b7643c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 7 Sep 2018 01:37:37 -0700 Subject: [PATCH 13/26] Update django-debug-toolbar from 1.9.1 to 1.10 (#1789) --- {{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 e29dab3ff..f7edc4c53 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -24,7 +24,7 @@ coverage==4.5.1 # https://github.com/nedbat/coveragepy # ------------------------------------------------------------------------------ factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==1.9.1 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==1.10 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.1.2 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.4.2 # https://github.com/pytest-dev/pytest-django From 028cf5c5ebecee78f642d15cd21d3b0e12e9eecc Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 7 Sep 2018 09:34:37 -0700 Subject: [PATCH 14/26] Update django-coverage-plugin from 1.5.0 to 1.6.0 --- {{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 f7edc4c53..bc0e7a8a5 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -26,5 +26,5 @@ factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==1.10 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.1.2 # https://github.com/django-extensions/django-extensions -django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin +django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.4.2 # https://github.com/pytest-dev/pytest-django From 6628fff9a0865f715b0f930f68ad56d3734c47de Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 7 Sep 2018 15:11:31 -0700 Subject: [PATCH 15/26] Update django-anymail to 4.2 (#1792) This PR updates [django-anymail[mailgun]](https://pypi.org/project/django-anymail) from **4.1** to **4.2**.
Changelog ### 4.2 ``` ---- *2018-09-07* Features ~~~~~~~~ * **Postmark:** Support per-recipient template `merge_data` and batch sending. (Batch sending can be used with or without a template. See `docs <https://anymail.readthedocs.io/en/stable/esps/postmark/postmark-templates>`__.) Fixes ~~~~~ * **Postmark:** When using `template_id`, ignore empty subject and body. (Postmark issues an error if Django's default empty strings are used with template sends.) ```
Links - PyPI: https://pypi.org/project/django-anymail - Changelog: https://pyup.io/changelogs/django-anymail/ - Repo: https://github.com/anymail/django-anymail
--- {{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 21fe5bc4e..5d02e1c7b 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -14,4 +14,4 @@ raven==6.9.0 # https://github.com/getsentry/raven-python # Django # ------------------------------------------------------------------------------ django-storages[boto3]==1.6.6 # https://github.com/jschneier/django-storages -django-anymail[mailgun]==4.1 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==4.2 # https://github.com/anymail/django-anymail From de5504f41466006890d12562de96d110dcdc08c7 Mon Sep 17 00:00:00 2001 From: Wan Liuyang Date: Sun, 9 Sep 2018 19:59:04 +0800 Subject: [PATCH 16/26] Rename custom S3Boto3Storage subclasses (#1784) Closes #1788 This PR preps for the upcoming `django-storages` 2.X: 1. ~~Explicitly set default ACL to None which was [incorrectly set](https://github.com/jschneier/django-storages/blob/3f6ec7494253dd715598a41dd821fc09d6f45e40/storages/backends/s3boto3.py#L195) to `public-read` by `django-storages`~~ 2. Renamed `StaticRootS3BotoStorage` to `StaticRootS3Boto3Storage` to avoid confusion. This is to prep for the upcoming `S3Boto` class deprecation. See also: https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings https://github.com/jschneier/django-storages/blob/master/CHANGELOG.rst --- .../config/settings/production.py | 8 ++++---- {{cookiecutter.project_slug}}/requirements/production.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 606535d4c..509455ed8 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -86,7 +86,7 @@ AWS_S3_OBJECT_PARAMETERS = { {% if cookiecutter.use_whitenoise == 'y' -%} STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' {%- else %} -STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage' +STATICFILES_STORAGE = 'config.settings.production.StaticRootS3Boto3Storage' STATIC_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/static/' {%- endif %} @@ -101,17 +101,17 @@ MEDIA_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/' from storages.backends.s3boto3 import S3Boto3Storage # noqa E402 -class StaticRootS3BotoStorage(S3Boto3Storage): +class StaticRootS3Boto3Storage(S3Boto3Storage): location = 'static' -class MediaRootS3BotoStorage(S3Boto3Storage): +class MediaRootS3Boto3Storage(S3Boto3Storage): location = 'media' file_overwrite = False # endregion -DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage' +DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3Boto3Storage' MEDIA_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/media/' {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 5d02e1c7b..3a138303c 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -13,5 +13,5 @@ raven==6.9.0 # https://github.com/getsentry/raven-python # Django # ------------------------------------------------------------------------------ -django-storages[boto3]==1.6.6 # https://github.com/jschneier/django-storages -django-anymail[mailgun]==4.2 # https://github.com/anymail/django-anymail +django-storages[boto3]==1.7.1 # https://github.com/jschneier/django-storages +django-anymail[mailgun]==4.2 # https://github.com/anymail/django-anymail \ No newline at end of file From ae4225e2ea323c367e797da5500d1be9cc8e2f3a Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 11 Sep 2018 02:52:44 -0700 Subject: [PATCH 17/26] Update django-debug-toolbar from 1.10 to 1.10.1 --- {{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 35bd20fd9..435a81466 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -24,7 +24,7 @@ coverage==4.5.1 # https://github.com/nedbat/coveragepy # ------------------------------------------------------------------------------ factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==1.10 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==1.10.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.1.2 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.4.2 # https://github.com/pytest-dev/pytest-django From bf6c7e8e9c4fa921312737b155d07cd30126ed75 Mon Sep 17 00:00:00 2001 From: Umair Ashraf Date: Wed, 12 Sep 2018 13:45:30 -0400 Subject: [PATCH 18/26] fixed s3 http url for static and media storage --- {{cookiecutter.project_slug}}/config/settings/production.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 509455ed8..343af72b5 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -87,14 +87,14 @@ AWS_S3_OBJECT_PARAMETERS = { STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' {%- else %} STATICFILES_STORAGE = 'config.settings.production.StaticRootS3Boto3Storage' -STATIC_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/static/' +STATIC_URL = f'https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/static/' {%- endif %} # MEDIA # ------------------------------------------------------------------------------ {% if cookiecutter.use_whitenoise == 'y' -%} DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' -MEDIA_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/' +MEDIA_URL = f'https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/' {%- else %} # region http://stackoverflow.com/questions/10390244/ # Full-fledge class: https://stackoverflow.com/a/18046120/104731 @@ -112,7 +112,7 @@ class MediaRootS3Boto3Storage(S3Boto3Storage): # endregion DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3Boto3Storage' -MEDIA_URL = f'https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/media/' +MEDIA_URL = f'https://{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/media/' {%- endif %} # TEMPLATES From 18ada469de35fed1d8b7ffe9d299032fc62848bb Mon Sep 17 00:00:00 2001 From: Umair Ashraf Date: Wed, 12 Sep 2018 13:57:11 -0400 Subject: [PATCH 19/26] added myself to contributors --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 2d9d278b6..c17c951ef 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -162,6 +162,7 @@ Listed in alphabetical order. Tom Atkins `@knitatoms`_ Tom Offermann Travis McNeill `@Travistock`_ @tavistock_esq + Umair Ashraf `@umrashrf`_ @fabumair Vitaly Babiy Vivian Guillen `@viviangb`_ Will Farley `@goldhand`_ @g01dhand @@ -276,6 +277,7 @@ Listed in alphabetical order. .. _@pchiquet: https://github.com/pchiquet .. _@delneg: https://github.com/delneg .. _@purplediane: https://github.com/purplediane +.. _@umrashrf: https://github.com/umrashrf Special Thanks ~~~~~~~~~~~~~~ From 4258ba9e2ddc822953e326f98f1f74842fa0fed1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 12 Sep 2018 12:16:22 -0700 Subject: [PATCH 20/26] Update sphinx from 1.7.9 to 1.8.0 (#1798) --- {{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 435a81466..3e3ddff6c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ Werkzeug==0.14.1 # https://github.com/pallets/werkzeug ipdb==0.11 # https://github.com/gotcha/ipdb -Sphinx==1.7.9 # https://github.com/sphinx-doc/sphinx +Sphinx==1.8.0 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} From f60b6d464cf8fc1751894a0d4756858aad9a680e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 12 Sep 2018 12:23:28 -0700 Subject: [PATCH 21/26] Update whitenoise from 4.0 to 4.1 (#1797) --- {{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 928ce679e..93418b5f2 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -6,7 +6,7 @@ rcssmin==1.0.6{% if cookiecutter.windows == 'y' %} --install-option="--without-c {%- endif %} argon2-cffi==18.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==4.0 # https://github.com/evansd/whitenoise +whitenoise==4.1 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} From 39e58fb0778860d072542ad42d78f6e391bc7b6b Mon Sep 17 00:00:00 2001 From: Chris Pappalardo Date: Fri, 14 Sep 2018 09:04:18 -0700 Subject: [PATCH 22/26] fixed production bugs in caddyfile and middleware --- .../compose/production/caddy/Caddyfile | 2 +- {{cookiecutter.project_slug}}/config/settings/production.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile index d36632e4b..eddb471c1 100644 --- a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile +++ b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile @@ -1,5 +1,5 @@ www.{% raw %}{$DOMAIN_NAME}{% endraw %} { - redir https://{{cookiecutter.domain_name}} + redir https://{% raw %}{$DOMAIN_NAME}{% endraw %} { } {% raw %}{$DOMAIN_NAME}{% endraw %} { diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 343af72b5..87753b552 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -164,7 +164,7 @@ INSTALLED_APPS += ['gunicorn'] # noqa F405 # WhiteNoise # ------------------------------------------------------------------------------ # http://whitenoise.evans.io/en/latest/django.html#enable-whitenoise -MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware'] + MIDDLEWARE # noqa F405 +MIDDLEWARE.insert(1, 'whitenoise.middleware.WhiteNoiseMiddleware') # noqa F405 {% endif %} {%- if cookiecutter.use_compressor == 'y' -%} From 73be494886b12cad9f95ee1bbd2d3e328ebe6fa0 Mon Sep 17 00:00:00 2001 From: Chris Pappalardo Date: Sat, 15 Sep 2018 12:44:03 -0700 Subject: [PATCH 23/26] removed extra bracket from redir line --- .../compose/production/caddy/Caddyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile index eddb471c1..c2bf241c7 100644 --- a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile +++ b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile @@ -1,5 +1,5 @@ www.{% raw %}{$DOMAIN_NAME}{% endraw %} { - redir https://{% raw %}{$DOMAIN_NAME}{% endraw %} { + redir https://{% raw %}{$DOMAIN_NAME}{% endraw %} } {% raw %}{$DOMAIN_NAME}{% endraw %} { From ea53635a0aa65e3c5b1722a957c8c1386cfdf755 Mon Sep 17 00:00:00 2001 From: Chris Pappalardo Date: Fri, 14 Sep 2018 09:04:18 -0700 Subject: [PATCH 24/26] fixed production bugs in caddyfile and middleware --- .../compose/production/caddy/Caddyfile | 2 +- {{cookiecutter.project_slug}}/config/settings/production.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile index d36632e4b..c2bf241c7 100644 --- a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile +++ b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile @@ -1,5 +1,5 @@ www.{% raw %}{$DOMAIN_NAME}{% endraw %} { - redir https://{{cookiecutter.domain_name}} + redir https://{% raw %}{$DOMAIN_NAME}{% endraw %} } {% raw %}{$DOMAIN_NAME}{% endraw %} { diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 343af72b5..87753b552 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -164,7 +164,7 @@ INSTALLED_APPS += ['gunicorn'] # noqa F405 # WhiteNoise # ------------------------------------------------------------------------------ # http://whitenoise.evans.io/en/latest/django.html#enable-whitenoise -MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware'] + MIDDLEWARE # noqa F405 +MIDDLEWARE.insert(1, 'whitenoise.middleware.WhiteNoiseMiddleware') # noqa F405 {% endif %} {%- if cookiecutter.use_compressor == 'y' -%} From 49a774085079326e41b2c5bc653f9dfd3f854992 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 16 Sep 2018 02:49:45 -0700 Subject: [PATCH 25/26] Update pytest-django from 3.4.2 to 3.4.3 (#1806) --- {{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 3e3ddff6c..1b81011f3 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -27,4 +27,4 @@ factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==1.10.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.1.2 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.4.2 # https://github.com/pytest-dev/pytest-django +pytest-django==3.4.3 # https://github.com/pytest-dev/pytest-django From 3a611d4767cdf0cd1770c8716cac7a08f6692478 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 17 Sep 2018 22:07:26 +0100 Subject: [PATCH 26/26] Fix package.json - Fix vertical spacing - Fix jQuery dependency --- {{cookiecutter.project_slug}}/package.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index 03a4e6a28..b29d52963 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -3,17 +3,17 @@ "version": "{{ cookiecutter.version }}", "dependencies": {}, "devDependencies": { - {% if cookiecutter.js_task_runner == 'Gulp' %} - {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + {% if cookiecutter.js_task_runner == 'Gulp' -%} + {% if cookiecutter.custom_bootstrap_compilation == 'y' -%} "bootstrap": "4.1.1", - {% endif %} + {% endif -%} "browser-sync": "^2.14.0", "del": "^2.2.2", "gulp": "^3.9.1", "gulp-autoprefixer": "^5.0.0", - {% if cookiecutter.custom_bootstrap_compilation == 'y' %} + {% if cookiecutter.custom_bootstrap_compilation == 'y' -%} "gulp-concat": "^2.6.1", - {% endif %} + {% endif -%} "gulp-cssnano": "^2.1.2", "gulp-imagemin": "^4.1.0", "gulp-pixrem": "^1.0.0", @@ -22,19 +22,19 @@ "gulp-sass": "^3.1.0", "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.7", - {% if cookiecutter.custom_bootstrap_compilation == 'y' %} - "jquery": "3.3.1-slim", + {% if cookiecutter.custom_bootstrap_compilation == 'y' -%} + "jquery": "3.3.1", "popper.js": "1.14.3", - {% endif %} + {% endif -%} "run-sequence": "^2.1.1" - {% endif %} + {%- endif %} }, "engines": { "node": ">=0.8.0" }, "scripts": { - {% if cookiecutter.js_task_runner == 'Gulp' %} + {% if cookiecutter.js_task_runner == 'Gulp' -%} "dev": "gulp" - {% endif %} + {%- endif %} } }