From 66ffa5c93c32c636d2e986c566eb4184e463a29f Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Thu, 6 Apr 2017 19:04:46 +0300 Subject: [PATCH 001/144] Switch to current runtime version Closes #1094 --- {{cookiecutter.project_slug}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index 94159178..e16ddff2 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -{% if cookiecutter.use_python3 == 'y' -%}python-3.5.1{% else %}python-2.7.10{%- endif %} +{% if cookiecutter.use_python3 == 'y' -%}python-3.5.3{% else %}python-2.7.10{%- endif %} From cbb55a73b864bfdefa04a404f17a88c9485e56a5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 12 Apr 2017 11:17:55 -0700 Subject: [PATCH 002/144] Update binaryornot from 0.4.0 to 0.4.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 63848a8e..c024694f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ cookiecutter==1.5.1 flake8==3.3.0 # pyup: != 2.6.0 sh==1.12.13 -binaryornot==0.4.0 +binaryornot==0.4.2 # Testing pytest==3.0.7 From 667d4df01df52dfa2f1fdd6d4fa6ffde190cd1ef Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 12 Apr 2017 22:55:42 +0200 Subject: [PATCH 003/144] Update binaryornot from 0.4.2 to 0.4.3 (#1120) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c024694f..528f9d95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ cookiecutter==1.5.1 flake8==3.3.0 # pyup: != 2.6.0 sh==1.12.13 -binaryornot==0.4.2 +binaryornot==0.4.3 # Testing pytest==3.0.7 From 6453fea417de512a2219da5011e5896f61032d74 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 13 Apr 2017 10:48:44 -0700 Subject: [PATCH 004/144] Easier placement of apps within the second level directory --- {{cookiecutter.project_slug}}/config/wsgi.py | 7 ++++++- {{cookiecutter.project_slug}}/manage.py | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/wsgi.py b/{{cookiecutter.project_slug}}/config/wsgi.py index 636f547a..05d56ab2 100644 --- a/{{cookiecutter.project_slug}}/config/wsgi.py +++ b/{{cookiecutter.project_slug}}/config/wsgi.py @@ -13,7 +13,12 @@ middleware here, or combine a Django application with an application of another framework. """ -import os +import os, sys + +# This allows easy placement of apps within the interior +# {{ cookiecutter.project_slug }} directory. +app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '') +sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}')) from django.core.wsgi import get_wsgi_application {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%} diff --git a/{{cookiecutter.project_slug}}/manage.py b/{{cookiecutter.project_slug}}/manage.py index 9de71376..9694c5f8 100755 --- a/{{cookiecutter.project_slug}}/manage.py +++ b/{{cookiecutter.project_slug}}/manage.py @@ -20,4 +20,10 @@ if __name__ == '__main__': "forget to activate a virtual environment?" ) raise + + # This allows easy placement of apps within the interior + # {{ cookiecutter.project_slug }} directory. + current_path = os.path.dirname(os.path.abspath(__file__)) + sys.path.append(os.path.join(current_path, '{{ cookiecutter.project_slug }}')) + execute_from_command_line(sys.argv) From 1c1cc9ee9c29a858aaff9276486de3bef6b56068 Mon Sep 17 00:00:00 2001 From: Shupeyko Nikita Date: Thu, 13 Apr 2017 20:50:11 +0300 Subject: [PATCH 005/144] Prevent PyCharm from formatting raven and opbeat imports (#1063) * Prevent PyCharm from formatting raven and opbeat imports Since raven and opbeat are required in production only, imports might (most surely will) be wiped out during PyCharm code clean up started in other environments. * Prevent PyCharm from formatting raven and opbeat imports Since raven and opbeat are required in production only, imports might (most surely will) be wiped out during PyCharm code clean up started in other environments. * Fix line breaks and spaces * Fix linebreaks --- .../taskapp/celery.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py index 8346f837..bea9768a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py @@ -28,9 +28,19 @@ class CeleryConfig(AppConfig): {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%} if hasattr(settings, 'RAVEN_CONFIG'): # Celery signal registration +{% if cookiecutter.use_pycharm == 'y' -%} + # Since raven is required in production only, + # imports might (most surely will) be wiped out + # during PyCharm code clean up started + # in other environments. + # @formatter:off +{%- endif %} from raven import Client as RavenClient from raven.contrib.celery import register_signal as raven_register_signal from raven.contrib.celery import register_logger_signal as raven_register_logger_signal +{% if cookiecutter.use_pycharm == 'y' -%} + # @formatter:on +{%- endif %} raven_client = RavenClient(dsn=settings.RAVEN_CONFIG['DSN']) raven_register_logger_signal(raven_client) @@ -39,10 +49,20 @@ class CeleryConfig(AppConfig): {% if cookiecutter.use_opbeat == 'y' -%} if hasattr(settings, 'OPBEAT'): +{% if cookiecutter.use_pycharm == 'y' -%} + # Since opbeat is required in production only, + # imports might (most surely will) be wiped out + # during PyCharm code clean up started + # in other environments. + # @formatter:off +{%- endif %} from opbeat.contrib.django.models import client as opbeat_client from opbeat.contrib.django.models import logger as opbeat_logger from opbeat.contrib.django.models import register_handlers as opbeat_register_handlers from opbeat.contrib.celery import register_signal as opbeat_register_signal +{% if cookiecutter.use_pycharm == 'y' -%} + # @formatter:on +{%- endif %} try: opbeat_register_signal(opbeat_client) From e9d94dbf5268f0a2241c8b60f8f5830b24566b7e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 13 Apr 2017 19:50:34 +0200 Subject: [PATCH 006/144] Update sphinx from 1.5.3 to 1.5.5 (#1104) --- {{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 67233494..9589fd73 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -4,7 +4,7 @@ coverage==4.3.4 django-coverage-plugin==1.5.0 -Sphinx==1.5.3 +Sphinx==1.5.5 django-extensions==1.7.8 Werkzeug==0.12.1 django-test-plus==1.0.17 From e365c39f2a0778a32d37fc1c59beee3df1924235 Mon Sep 17 00:00:00 2001 From: Shupeyko Nikita Date: Thu, 13 Apr 2017 20:50:56 +0300 Subject: [PATCH 007/144] gitignore generated project's .cache/ dir (#1061) --- {{cookiecutter.project_slug}}/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 90ce80dc..6a0a3029 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -76,3 +76,6 @@ mailhog {% endif %} staticfiles/ + +.cache/ + From f7ca4d712ccaebba88c12c9aac0411bbcfdbbba7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 13 Apr 2017 19:54:18 +0200 Subject: [PATCH 008/144] Update tox from 2.6.0 to 2.7.0 (#1113) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 528f9d95..ebc61804 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ binaryornot==0.4.3 pytest==3.0.7 pep8==1.7.0 pyflakes==1.5.0 -tox==2.6.0 +tox==2.7.0 pytest-cookies==0.2.0 From a3b0feec120dd02c31f92d10fbf77e1f63976da7 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 13 Apr 2017 11:27:54 -0700 Subject: [PATCH 009/144] Flake8 fix --- {{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 05d56ab2..741b0798 100644 --- a/{{cookiecutter.project_slug}}/config/wsgi.py +++ b/{{cookiecutter.project_slug}}/config/wsgi.py @@ -15,12 +15,13 @@ framework. """ import os, sys +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', '') sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}')) -from django.core.wsgi import get_wsgi_application {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%} if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production': from raven.contrib.django.raven_compat.middleware.wsgi import Sentry From ba2301fc3c524edce7aca3c883763f2778dd39f3 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 13 Apr 2017 11:30:57 -0700 Subject: [PATCH 010/144] Fix multiple imports on one line --- README.rst | 14 +++++++------- {{cookiecutter.project_slug}}/config/wsgi.py | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 0817c6b8..2648aeac 100644 --- a/README.rst +++ b/README.rst @@ -84,7 +84,7 @@ Constraints * Only maintained 3rd party libraries are used. * Uses PostgreSQL everywhere (9.2+) -* Environment variables for configuration (This won't work with Apache/mod_wsgi). +* Environment variables for configuration (This won't work with Apache/mod_wsgi except on AWS ELB). Usage @@ -273,18 +273,18 @@ Two Scoops Press :align: center :alt: Two Scoops Press :target: https://twoscoopspress.com - -Two Scoops Press brings you the best dairy-themed Django references in the universe - + +Two Scoops Press brings you the best dairy-themed Django references in the universe + pyup -~~~~~~~~~~~~~~~~~~ - +~~~~~~~~~~~~~~~~~~ + .. image:: https://pyup.io/static/images/logo.png :name: pyup :align: center :alt: pyup :target: https://pyup.io/ - + Pyup brings you automated security and dependency updates used by Google and other organizations. Free for open source projects! .. _`PyPA Code of Conduct`: https://www.pypa.io/en/latest/code-of-conduct/ diff --git a/{{cookiecutter.project_slug}}/config/wsgi.py b/{{cookiecutter.project_slug}}/config/wsgi.py index 741b0798..601d27c6 100644 --- a/{{cookiecutter.project_slug}}/config/wsgi.py +++ b/{{cookiecutter.project_slug}}/config/wsgi.py @@ -13,7 +13,8 @@ middleware here, or combine a Django application with an application of another framework. """ -import os, sys +import os +import sys from django.core.wsgi import get_wsgi_application From a383fa23788e976a6d9f30a2425cb33394042ce6 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 14 Apr 2017 11:54:38 -0700 Subject: [PATCH 011/144] Document source of unclear links --- .../{{cookiecutter.project_slug}}/templates/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 4ed49964..2814ee77 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -7,7 +7,7 @@ - + - + {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %} @@ -29,48 +29,43 @@
-