From 49c73feebb20bc29db51512028713bd6754c954e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 28 Jun 2018 09:00:53 -0300 Subject: [PATCH 001/178] remove inline comments of on heroku tutorial --- docs/deployment-on-heroku.rst | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index 7006a2877..d7d95184d 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -21,17 +21,27 @@ Run these commands to deploy the project to Heroku: heroku addons:create sentry:f1 heroku config:set PYTHONHASHSEED=random + heroku config:set WEB_CONCURRENCY=4 + heroku config:set DJANGO_DEBUG=False heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)" + # Generating a 32 character-long random string without any of the visually similiar characters "IOl01": heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/" - heroku config:set DJANGO_ALLOWED_HOSTS= # Set this to your Heroku app url, e.g. 'bionic-beaver-28392.herokuapp.com' - - heroku config:set DJANGO_AWS_ACCESS_KEY_ID= # Assign with AWS_ACCESS_KEY_ID - heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY= # Assign with AWS_SECRET_ACCESS_KEY - heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME= # Assign with AWS_STORAGE_BUCKET_NAME + + # Set this to your Heroku app url, e.g. 'bionic-beaver-28392.herokuapp.com' + heroku config:set DJANGO_ALLOWED_HOSTS= + + # Assign with AWS_ACCESS_KEY_ID + heroku config:set DJANGO_AWS_ACCESS_KEY_ID= + + # Assign with AWS_SECRET_ACCESS_KEY + heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY= + + # Assign with AWS_STORAGE_BUCKET_NAME + heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME= git push heroku master From ac61117b59e8aaf8a644501f432cb71e8e5df9a2 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Thu, 28 Jun 2018 16:35:35 +0300 Subject: [PATCH 002/178] Prevent AWS S3 bucket from being created automatically Rationale: most of the time you want to create a bucket yourself in order to assign/tweak polices etc. --- {{cookiecutter.project_slug}}/config/settings/production.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index ecd517ddd..39df0cbfa 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -73,8 +73,6 @@ AWS_SECRET_ACCESS_KEY = env('DJANGO_AWS_SECRET_ACCESS_KEY') # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings AWS_STORAGE_BUCKET_NAME = env('DJANGO_AWS_STORAGE_BUCKET_NAME') # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings -AWS_AUTO_CREATE_BUCKET = True -# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings AWS_QUERYSTRING_AUTH = False # DO NOT change these unless you know what you're doing. _AWS_EXPIRY = 60 * 60 * 24 * 7 From c5c6bace995473ab3d7a6c9c7927614660a430cd Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Thu, 28 Jun 2018 16:39:51 +0300 Subject: [PATCH 003/178] Remove LICENSE for non open source projects --- hooks/post_gen_project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 9118f6c93..b75ec3d90 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -32,7 +32,10 @@ DEBUG_VALUE = "debug" def remove_open_source_files(): - file_names = ["CONTRIBUTORS.txt"] + file_names = [ + "CONTRIBUTORS.txt", + "LICENSE", + ] for file_name in file_names: os.remove(file_name) From ed7609f7153f297b674019df3a58f053f68f25c2 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Thu, 28 Jun 2018 16:43:34 +0300 Subject: [PATCH 004/178] Remove utility/ when use_docker=y --- hooks/post_gen_project.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b75ec3d90..669edb0ef 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -64,6 +64,10 @@ def remove_docker_files(): os.remove(file_name) +def remove_utility_files(): + shutil.rmtree("utility") + + def remove_heroku_files(): file_names = ["Procfile", "runtime.txt", "requirements.txt"] for file_name in file_names: @@ -278,7 +282,9 @@ def main(): if "{{ cookiecutter.use_pycharm }}".lower() == "n": remove_pycharm_files() - if "{{ cookiecutter.use_docker }}".lower() == "n": + if "{{ cookiecutter.use_docker }}".lower() == "y": + remove_utility_files() + else: remove_docker_files() if "{{ cookiecutter.use_heroku }}".lower() == "n": From f13c99f0a50892dbd35206176390e1821ae270bc Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 30 Jun 2018 10:59:23 +0200 Subject: [PATCH 005/178] Update pytz from 2018.4 to 2018.5 (#1699) --- {{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 5dd5d99e6..74a417e2d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2018.4 # https://github.com/stub42/pytz +pytz==2018.5 # https://github.com/stub42/pytz python-slugify==1.2.5 # https://github.com/un33k/python-slugify Pillow==5.1.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} From d7a05cf69d30e7bdb2b735ad30cb26f1dc5ec1a9 Mon Sep 17 00:00:00 2001 From: Denis Orehovsky Date: Mon, 2 Jul 2018 10:22:48 +0300 Subject: [PATCH 006/178] Add mypy to the local dependencies --- {{cookiecutter.project_slug}}/README.rst | 9 +++++++++ .../requirements/local.txt | 1 + {{cookiecutter.project_slug}}/setup.cfg | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 3386d9855..2f40710e2 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -32,6 +32,15 @@ Setting Up Your Users For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users. +Type checks +^^^^^^^^^^^ + +Running type checks with mypy: + +:: + + $ mypy {{cookiecutter.project_slug}} + Test coverage ^^^^^^^^^^^^^ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 63799d990..b8a7609c2 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,6 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ +mypy==0.610 # https://github.com/python/mypy pytest==3.6.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 1ec89c789..c2139f1db 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -5,3 +5,17 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [pycodestyle] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules + +[mypy] +python_version = 3.6 +check_untyped_defs = True +ignore_errors = False +ignore_missing_imports = True +strict_optional = True +warn_unused_ignores = True +warn_redundant_casts = True +warn_unused_configs = True + +[mypy-*.migrations.*] +# Django migrations should not produce any errors: +ignore_errors = True From 8586cb0cefe7b6b3467e57b17021ac66599edc90 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 2 Jul 2018 21:17:46 +0200 Subject: [PATCH 007/178] Update pillow from 5.1.0 to 5.2.0 (#1704) --- {{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 74a417e2d..26296fe11 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2018.5 # https://github.com/stub42/pytz python-slugify==1.2.5 # https://github.com/un33k/python-slugify -Pillow==5.1.0 # https://github.com/python-pillow/Pillow +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 {%- endif %} From ed389e7401b92b988d04d4bb8bf0fd66007eb7bc Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 2 Jul 2018 21:18:13 +0200 Subject: [PATCH 008/178] Update django from 2.0.6 to 2.0.7 (#1707) --- {{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 26296fe11..9d49be2a9 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -18,7 +18,7 @@ flower==0.9.2 # https://github.com/mher/flower # Django # ------------------------------------------------------------------------------ -django==2.0.6 # pyup: < 2.1 # https://www.djangoproject.com/ +django==2.0.7 # pyup: < 2.1 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils django-allauth==0.36.0 # https://github.com/pennersr/django-allauth From f92acfacc4742867a1ed8584963db188dd97e965 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 5 Jul 2018 16:41:25 +0200 Subject: [PATCH 009/178] Update pytest to 3.6.3 (#1709) * Update pytest from 3.6.2 to 3.6.3 * Update pytest from 3.6.2 to 3.6.3 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 77770fa9e..68a36940e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.0.0 -pytest==3.6.2 +pytest==3.6.3 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 63799d990..c88fe8853 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.6.2 # https://github.com/pytest-dev/pytest +pytest==3.6.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 494492b1dbba8b96c03b700064c5956f225695fb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 10 Jul 2018 04:27:59 +0200 Subject: [PATCH 010/178] Update tox to 3.1.1 (#1715) This PR updates [tox](https://pypi.org/project/tox) from **3.0.0** to **3.1.1**.
Changelog ### 3.1.0 ``` ------------------ Bugfixes ^^^^^^^^ - Add ``ignore_basepython_conflict``, which determines whether conflicting ``basepython`` settings for environments containing default factors, such as ``py27`` or ``django18-py35``, should be ignored or result in warnings. This was a common source of misconfiguration and is rarely, if ever, desirable from a user perspective - by :user:`stephenfin` (`477 <https://github.com/tox-dev/tox/issues/477>`_) - Fix bug with incorrectly defactorized dependencies (deps passed to pip were not de-factorized) - by :user:`bartsanchez` (`706 <https://github.com/tox-dev/tox/issues/706>`_) Features ^^^^^^^^ - Add support for multiple PyPy versions using default factors. This allows you to use, for example, ``pypy27`` knowing that the correct intepreter will be used by default - by :user:`stephenfin` (`19 <https://github.com/tox-dev/tox/issues/19>`_) - Add support to explicitly invoke interpreter directives for environments with long path lengths. In the event that ``tox`` cannot invoke scripts with a system-limited shebang (e.x. a Linux host running a Jenkins Pipeline), a user can set the environment variable ``TOX_LIMITED_SHEBANG`` to workaround the system's limitation (e.x. ``export TOX_LIMITED_SHEBANG=1``) - by :user:`jdknight` (`794 <https://github.com/tox-dev/tox/issues/794>`_) - introduce a constants module to be used internally and as experimental API - by :user:`obestwalter` (`798 <https://github.com/tox-dev/tox/issues/798>`_) - Make ``py2`` and ``py3`` aliases also resolve via ``py`` on windows by :user:`asottile`. This enables the following things: ``tox -e py2`` and ``tox -e py3`` work on windows (they already work on posix); and setting ``basepython=python2`` or ``basepython=python3`` now works on windows. (`856 <https://github.com/tox-dev/tox/issues/856>`_) - Replace the internal version parsing logic from the not well tested `PEP-386 <https://www.python.org/dev/peps/pep-0386/>`_ parser for the more general `PEP-440 <https://www.python.org/dev/peps/pep-0440/>`_. `packaging >= 17.1 <https://pypi.org/project/packaging/>`_ is now an install dependency by :user:`gaborbernat`. (`860 <https://github.com/tox-dev/tox/issues/860>`_) Documentation ^^^^^^^^^^^^^ - extend the plugin documentation and make lot of small fixes and improvements - by :user:`obestwalter` (`797 <https://github.com/tox-dev/tox/issues/797>`_) - tidy up tests - remove unused fixtures, update old cinstructs, etc. - by :user:`obestwalter` (`799 <https://github.com/tox-dev/tox/issues/799>`_) - Various improvements to documentation: open browser once documentation generation is done, show Github/Travis info on documentation page, remove duplicate header for changelog, generate unreleased news as DRAFT on top of changelog, make the changelog page more compact and readable (width up to 1280px) by :user:`gaborbernat` (`859 <https://github.com/tox-dev/tox/issues/859>`_) Miscellaneous ^^^^^^^^^^^^^ - filter out unwanted files in package - by :user:`obestwalter` (`754 <https://github.com/tox-dev/tox/issues/754>`_) - make the already existing implicit API explicit - by :user:`obestwalter` (`800 <https://github.com/tox-dev/tox/issues/800>`_) - improve tox quickstart and corresponding tests - by :user:`obestwalter` (`801 <https://github.com/tox-dev/tox/issues/801>`_) - tweak codecov settings via .codecov.yml - by :user:`obestwalter` (`802 <https://github.com/tox-dev/tox/issues/802>`_) ```
Links - PyPI: https://pypi.org/project/tox - Changelog: https://pyup.io/changelogs/tox/ - Docs: https://tox.readthedocs.org/
--- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 68a36940e..fca457e76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ -tox==3.0.0 +tox==3.1.1 pytest==3.6.3 pytest-cookies==0.3.0 From 27bc27e634c8b6b23f351cad5f52d4b860df0314 Mon Sep 17 00:00:00 2001 From: Hendrik Schneider Date: Tue, 10 Jul 2018 22:22:10 +0000 Subject: [PATCH 011/178] Update project.js --- .../{{cookiecutter.project_slug}}/static/js/project.js | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js index 91ab9e2da..322806556 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js @@ -18,4 +18,3 @@ Issues with the above approach: 3. Really Unforgiving: No way to override this behavior 4. Undocumented: No mention in the documentation, or it's too hard for me to find */ -$('.form-group').removeClass('row'); From a03db9396c8aa6df1d2c4617abab70cbb6a404bb Mon Sep 17 00:00:00 2001 From: Hendrik Schneider Date: Tue, 10 Jul 2018 22:26:10 +0000 Subject: [PATCH 012/178] Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 6b3f00660..e32e556af 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -99,6 +99,7 @@ Listed in alphabetical order. Garry Polley `@garrypolley`_ Hamish Durkin `@durkode`_ Harry Percival `@hjwp`_ + Hendrik Schneider `@hendrikschneider`_ Henrique G. G. Pereira `@ikkebr`_ Ian Lee `@IanLee1521`_ Jan Van Bruggen `@jvanbrug`_ @@ -209,6 +210,7 @@ Listed in alphabetical order. .. _@goldhand: https://github.com/goldhand .. _@hackebrot: https://github.com/hackebrot .. _@hairychris: https://github.com/hairychris +.. _@hendrikschneider https://github.com/hendrikschneider .. _@hjwp: https://github.com/hjwp .. _@IanLee1521: https://github.com/IanLee1521 .. _@ikkebr: https://github.com/ikkebr From 9932ea3b18fb1ee9eca9e4688516329a41e2f1cf Mon Sep 17 00:00:00 2001 From: Hendrik Schneider Date: Wed, 11 Jul 2018 10:43:19 +0000 Subject: [PATCH 013/178] Update project.js --- .../static/js/project.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js index 322806556..d26d23b9b 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js @@ -1,20 +1 @@ /* Project specific Javascript goes here. */ - -/* -Formatting hack to get around crispy-forms unfortunate hardcoding -in helpers.FormHelper: - - if template_pack == 'bootstrap4': - grid_colum_matcher = re.compile('\w*col-(xs|sm|md|lg|xl)-\d+\w*') - using_grid_layout = (grid_colum_matcher.match(self.label_class) or - grid_colum_matcher.match(self.field_class)) - if using_grid_layout: - items['using_grid_layout'] = True - -Issues with the above approach: - -1. Fragile: Assumes Bootstrap 4's API doesn't change (it does) -2. Unforgiving: Doesn't allow for any variation in template design -3. Really Unforgiving: No way to override this behavior -4. Undocumented: No mention in the documentation, or it's too hard for me to find -*/ From 19b75e4dd1530649415573f326aa3e52e8c521b7 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 11 Jul 2018 16:57:43 +0100 Subject: [PATCH 014/178] Upgrade Heroku to the latest Python 3.6.x: 3.6.6 --- {{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 486fcce12..1935e9778 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.6.5 +python-3.6.6 From 80f6b1958e577addd92d733f65b864491bb77100 Mon Sep 17 00:00:00 2001 From: Mateusz Ostaszewski Date: Thu, 12 Jul 2018 11:35:28 +0200 Subject: [PATCH 015/178] Update bootstrap to 4.1.1 (#1697) * Update Bootstrap to 4.1.1 * Add myself to contributors --- CONTRIBUTORS.rst | 2 ++ README.rst | 2 +- {{cookiecutter.project_slug}}/README.rst | 4 ++-- {{cookiecutter.project_slug}}/package.json | 6 +++--- .../templates/base.html | 12 ++++++------ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 6b3f00660..324d1a660 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -122,6 +122,7 @@ Listed in alphabetical order. Malik Sulaimanov `@flyudvik`_ @flyudvik Martin Blech Martin Saizar `@msaizar`_ + Mateusz Ostaszewski `@mostaszewski`_ Mathijs Hoogland `@MathijsHoogland`_ Matt Braymer-Hayes `@mattayes`_ @mattayes Matt Linares @@ -226,6 +227,7 @@ Listed in alphabetical order. .. _@MathijsHoogland: https://github.com/MathijsHoogland .. _@mattayes: https://github.com/mattayes .. _@menzenski: https://github.com/menzenski +.. _@mostaszewski: https://github.com/mostaszewski .. _@mfwarren: https://github.com/mfwarren .. _@mimischi: https://github.com/mimischi .. _@mjsisley: https://github.com/mjsisley diff --git a/README.rst b/README.rst index a69712d07..b5a3e7c0e 100644 --- a/README.rst +++ b/README.rst @@ -41,7 +41,7 @@ Features * For Django 2.0 * Works with Python 3.6 * Renders Django projects with 100% starting test coverage -* Twitter Bootstrap_ v4.0.0 (`maintained Foundation fork`_ also available) +* Twitter Bootstrap_ v4.1.1 (`maintained Foundation fork`_ also available) * 12-Factor_ based settings via django-environ_ * Secure by default. We believe in SSL. * Optimized development and production settings diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 3386d9855..aef0896a6 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -138,7 +138,7 @@ Custom Bootstrap Compilation ^^^^^^ 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``. +Bootstrap v4.1.1 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 source`_, or get explanations on them in the `Bootstrap docs`_. @@ -147,6 +147,6 @@ Bootstrap's javascript as well as its dependencies is concatenated into a single {% 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/ +.. _Bootstrap docs: https://getbootstrap.com/docs/4.1/getting-started/theming/ {% endif %} diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index f32c41a26..03a4e6a28 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -5,7 +5,7 @@ "devDependencies": { {% if cookiecutter.js_task_runner == 'Gulp' %} {% if cookiecutter.custom_bootstrap_compilation == 'y' %} - "bootstrap": "^4.0.0", + "bootstrap": "4.1.1", {% endif %} "browser-sync": "^2.14.0", "del": "^2.2.2", @@ -23,8 +23,8 @@ "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.7", {% if cookiecutter.custom_bootstrap_compilation == 'y' %} - "jquery": "^3.2.1-slim", - "popper.js": "^1.12.3", + "jquery": "3.3.1-slim", + "popper.js": "1.14.3", {% endif %} "run-sequence": "^2.1.1" {% endif %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 2cb705663..6865c929d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -17,8 +17,8 @@ {% block css %} {% endraw %}{% if cookiecutter.custom_bootstrap_compilation == "n" %}{% raw %} - - + + {% endraw %}{% endif %}{% raw %} @@ -102,10 +102,10 @@ {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %} {% endraw %}{% else %}{% raw %} - - - - + + + + {% endraw %}{% endif %}{% raw %} From e6d33da298e72314768f38374e9dfb19702947e8 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 13 Jul 2018 06:05:02 +0200 Subject: [PATCH 016/178] Update tox from 3.1.1 to 3.1.2 (#1718) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fca457e76..36c1d8cb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ -tox==3.1.1 +tox==3.1.2 pytest==3.6.3 pytest-cookies==0.3.0 From 399cce6eb72a8f2c609c8b7dd43b7a7c75cffe15 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 17 Jul 2018 05:25:36 +0200 Subject: [PATCH 017/178] Update django-extensions to 2.1.0 (#1720) This PR updates [django-extensions](https://pypi.org/project/django-extensions) from **2.0.7** to **2.1.0**.
Changelog ### 2.1.0 ``` Changes: - Fix: travis ``` ### 2.0.9 ``` ----- Changes: - Improvement: use README as project description on PyPI ``` ### 2.0.8 ``` ----- Please stop using ForeignKeyAutocompleteAdmin edition :-) Changes: - Fix: special markers in runserver_plus.rst - Fix: shell_plus, refactor reading pythonrc file outside of exec(compile(...)) - Fix: reset_db, fix default utf8 support - Fix: autoslugfield, Fix autoslug generation when existing model is copied - Improvement: Cleanup management commands options after argparse migration 916 - Improvement: sqldiff, add more tests - Improvement: sqldiff, add DurationField and SearchVectorField - Improvement: shell_plus, add more tests - Improvement: shell_plus, backport macos fix for tab completion - Improvement: clear_cache, add --all option - Improvement: pipchecker, treat dev versions as unstable - Deprecation: ForeignKeyAutocompleteAdmin, Django 2.0 has similar capabilities, which are much better supported. ```
Links - PyPI: https://pypi.org/project/django-extensions - Changelog: https://pyup.io/changelogs/django-extensions/ - Repo: http://github.com/django-extensions/django-extensions
--- {{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 c88fe8853..1b6048f89 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -24,6 +24,6 @@ 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-extensions==2.0.7 # https://github.com/django-extensions/django-extensions +django-extensions==2.1.0 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.3.2 # https://github.com/pytest-dev/pytest-django From e34ab9b87594f684ce5223c9b7f7c5b57a6e022d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 17 Jul 2018 05:26:04 +0200 Subject: [PATCH 018/178] Update sphinx from 1.7.5 to 1.7.6 (#1719) --- {{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 1b6048f89..b41a75043 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.5 # https://github.com/sphinx-doc/sphinx +Sphinx==1.7.6 # 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 72d6be7883f7afd2b5642cdbd01d28ddeda69b77 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 18 Jul 2018 04:03:29 -0700 Subject: [PATCH 019/178] Update celery from 4.2.0 to 4.2.1 --- {{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 9d49be2a9..8377d03ef 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ whitenoise==3.3.1 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} -celery==4.2.0 # pyup: <5.0 # https://github.com/celery/celery +celery==4.2.1 # pyup: <5.0 # https://github.com/celery/celery {%- if cookiecutter.use_docker == 'y' %} flower==0.9.2 # https://github.com/mher/flower {%- endif %} From 61be16a867e106f61db298afbb94c8c5ea2349f2 Mon Sep 17 00:00:00 2001 From: John Cass Date: Wed, 18 Jul 2018 17:15:44 +0200 Subject: [PATCH 020/178] Update test coverage command for usage with py.test. --- CONTRIBUTORS.rst | 3 ++- {{cookiecutter.project_slug}}/README.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index e9f796099..814395b45 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -105,6 +105,7 @@ Listed in alphabetical order. Jan Van Bruggen `@jvanbrug`_ Jens Nilsson `@phiberjenz`_ Jimmy Gitonga `@afrowave`_ @afrowave + John Cass `@jcass77`_ @cass_john Julien Almarcha `@sladinji`_ Julio Castillo `@juliocc`_ Kaido Kert `@kaidokert`_ @@ -164,7 +165,7 @@ Listed in alphabetical order. Will Farley `@goldhand`_ @g01dhand William Archinal `@archinal`_ Yaroslav Halchenko - Denis Bobrov `@delneg`_ + Denis Bobrov `@delneg`_ ========================== ============================ ============== .. _@a7p: https://github.com/a7p diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index aef0896a6..80e4aa925 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -37,7 +37,7 @@ Test coverage To run the tests, check your test coverage, and generate an HTML coverage report:: - $ coverage run manage.py test + $ coverage run -m pytest $ coverage html $ open htmlcov/index.html From bb01d961edb73848c29f387974dd89ca639d446b Mon Sep 17 00:00:00 2001 From: John Cass Date: Mon, 23 Jul 2018 08:51:06 +0200 Subject: [PATCH 021/178] Use pytest's recommended command as the entry point for running tests. --- tests/test_docker.sh | 2 +- {{cookiecutter.project_slug}}/README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_docker.sh b/tests/test_docker.sh index bebac1488..78c5717a6 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -15,7 +15,7 @@ cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y cd my_awesome_project # run the project's tests -docker-compose -f local.yml run django python manage.py test +docker-compose -f local.yml run django python manage.py pytest # return non-zero status code if there are migrations that have not been created docker-compose -f local.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; } diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 80e4aa925..c282f73a7 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -46,7 +46,7 @@ Running tests with py.test :: - $ py.test + $ pytest Live reloading and Sass CSS compilation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 55debd5b6b6aa72ba29309960430426f9d97b9e8 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 27 Jul 2018 04:21:45 +0200 Subject: [PATCH 022/178] Update pytest-django to 3.3.3 (#1728) This PR updates [pytest-django](https://pypi.org/project/pytest-django) from **3.3.2** to **3.3.3**.
Changelog ### 3.3.3 ``` ------------------ Bug fixes ^^^^^^^^^ * Fixed registration of :py:func:`~pytest.mark.ignore_template_errors` marker, which is required with ``pytest --strict`` (609). * Fixed another regression with unittest (624, 625). Docs ^^^^ * Use sphinx_rtf_theme (621). * Minor fixes. ```
Links - PyPI: https://pypi.org/project/pytest-django - Changelog: https://pyup.io/changelogs/pytest-django/ - Docs: https://pytest-django.readthedocs.io/
--- {{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 b41a75043..18d17a4cc 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -26,4 +26,4 @@ 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-extensions==2.1.0 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.3.2 # https://github.com/pytest-dev/pytest-django +pytest-django==3.3.3 # https://github.com/pytest-dev/pytest-django From 6c2a130e3db8d8e55ab1a7160321555ac9408e81 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 29 Jul 2018 13:12:41 +0200 Subject: [PATCH 023/178] Update pytest to 3.6.4 (#1731) * Update pytest from 3.6.3 to 3.6.4 * Update pytest from 3.6.3 to 3.6.4 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 36c1d8cb3..0500c18f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.1.2 -pytest==3.6.3 +pytest==3.6.4 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 18d17a4cc..c7f54b495 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.6.3 # https://github.com/pytest-dev/pytest +pytest==3.6.4 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From dc1119591708af709788f5902dcd966491741ac1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Aug 2018 02:17:27 +0200 Subject: [PATCH 024/178] Update django to 2.0.8 (#1734) This PR updates [django](https://pypi.org/project/django) from **2.0.7** to **2.0.8**.
Changelog ### 2.0.8 ``` ========================== *August 1, 2018* Django 2.0.8 fixes a security issue and several bugs in 2.0.7. CVE-2018-14574: Open redirect possibility in ``CommonMiddleware`` ================================================================= If the :class:`~django.middleware.common.CommonMiddleware` and the :setting:`APPEND_SLASH` setting are both enabled, and if the project has a URL pattern that accepts any path ending in a slash (many content management systems have such a pattern), then a request to a maliciously crafted URL of that site could lead to a redirect to another site, enabling phishing and other attacks. ``CommonMiddleware`` now escapes leading slashes to prevent redirects to other domains. Bugfixes ======== * Fixed a regression in Django 2.0.7 that broke the ``regex`` lookup on MariaDB (even though MariaDB isn't officially supported) (:ticket:`29544`). * Fixed a regression where ``django.template.Template`` crashed if the ``template_string`` argument is lazy (:ticket:`29617`). ========================== ```
Links - PyPI: https://pypi.org/project/django - Changelog: https://pyup.io/changelogs/django/ - Homepage: https://www.djangoproject.com/
--- {{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 8377d03ef..dbaf83fe3 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -18,7 +18,7 @@ flower==0.9.2 # https://github.com/mher/flower # Django # ------------------------------------------------------------------------------ -django==2.0.7 # pyup: < 2.1 # https://www.djangoproject.com/ +django==2.0.8 # pyup: < 2.1 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils django-allauth==0.36.0 # https://github.com/pennersr/django-allauth From 0aa761ef45029e23a33b1e2c2be392a301a068fc Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 3 Aug 2018 02:04:59 -0700 Subject: [PATCH 025/178] Update pytest from 3.6.4 to 3.7.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0500c18f5..928cc2ff8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.1.2 -pytest==3.6.4 +pytest==3.7.1 pytest-cookies==0.3.0 From d78978abd5ffbca3042586475f228cfd1b2a8437 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 3 Aug 2018 02:05:01 -0700 Subject: [PATCH 026/178] Update pytest from 3.6.4 to 3.7.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 c7f54b495..a53e06182 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.6.4 # https://github.com/pytest-dev/pytest +pytest==3.7.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 7401be4de077a8f7558df7586ddf6e11dcbf4db4 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 4 Aug 2018 03:40:02 -0500 Subject: [PATCH 027/178] Update tox from 3.1.2 to 3.1.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 928cc2ff8..7975aafd0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ -tox==3.1.2 +tox==3.1.3 pytest==3.7.1 pytest-cookies==0.3.0 From 0a858bf512affa264e1a16bd9746e3f527213800 Mon Sep 17 00:00:00 2001 From: Diane DeMers Chen Date: Mon, 13 Aug 2018 05:57:28 -0700 Subject: [PATCH 028/178] Add note about using keep_local_envs_in_vcs (#1735) * Add note about using keep_local_envs_in_vcs As a newbie, I wasn't sure about `keep_local_envs_in_vcs`, so I said yes, and when CC was building, it gave me the message: "[INFO]: .env(s) are only utilized when Docker Compose and/or Heroku support is enabled so keeping them does not make sense given your current setup." Seems like it could go in this documentation, and make things easier for newbies. * Add me to CONTRIBUTORS.RST --- CONTRIBUTORS.rst | 2 ++ docs/project-generation-options.rst | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 814395b45..bbbfaf9a8 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -89,6 +89,7 @@ Listed in alphabetical order. Delio Castillo `@jangeador`_ @jangeador Denis Orehovsky `@apirobot`_ Dónal Adams `@epileptic-fish`_ + Diane Chen `@purplediane`_ @purplediane88 Dong Huynh `@trungdong`_ Emanuel Calso `@bloodpet`_ @bloodpet Eraldo Energy `@eraldo`_ @@ -272,6 +273,7 @@ Listed in alphabetical order. .. _@afrowave: https://github.com/afrowave .. _@pchiquet: https://github.com/pchiquet .. _@delneg: https://github.com/delneg +.. _@purplediane: https://github.com/purplediane Special Thanks ~~~~~~~~~~~~~~ diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 60453b870..a54837979 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -93,7 +93,8 @@ use_travisci: keep_local_envs_in_vcs: Indicates whether the project's ``.envs/.local/`` should be kept in VCS (comes in handy when working in teams where local environment reproducibility - is strongly encouraged). + is strongly encouraged). + Note: .env(s) are only utilized when Docker Compose and/or Heroku support is enabled. debug: Indicates whether the project should be configured for debugging. From d726202cae5fc129964b4e67ac90ed50cb245879 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 13 Aug 2018 15:02:24 +0200 Subject: [PATCH 029/178] Update tox from 3.1.3 to 3.2.1 (#1744) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7975aafd0..f2ff57d12 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ -tox==3.1.3 +tox==3.2.1 pytest==3.7.1 pytest-cookies==0.3.0 From 36f3558ccc934e19ba54cfe16c92abb5d720b5bd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 13 Aug 2018 15:06:42 +0200 Subject: [PATCH 030/178] Update whitenoise from 3.3.1 to 4.0 (#1745) --- {{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 dbaf83fe3..68d8ddd71 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.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==3.3.1 # https://github.com/evansd/whitenoise +whitenoise==4.0 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} From 40cd1fc2ee6344bb8aedbfcc4082671be101dd47 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 15 Aug 2018 11:21:59 +0100 Subject: [PATCH 031/178] 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 b8f6f43a606458fc79adeca15a23528c47a852fa Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Aug 2018 18:17:04 -0700 Subject: [PATCH 032/178] Update pytest-django to 3.4.1 (#1753) This PR updates [pytest-django](https://pypi.org/project/pytest-django) from **3.3.3** to **3.4.1**.
Changelog ### 3.4.0 ``` ------------------ Features ^^^^^^^^ * Added new fixture :fixture:`django_assert_max_num_queries` (547). * Added support for ``connection`` and returning the wrapped context manager with :fixture:`django_assert_num_queries` (547). * Added support for resetting sequences via :fixture:`django_db_reset_sequences` (619). Bugfixes ^^^^^^^^ * Made sure to not call django.setup() multiple times (629, 531). Compatibility ^^^^^^^^^^^^^ * Removed py dependency, use pathlib instead (631). ```
Links - PyPI: https://pypi.org/project/pytest-django - Changelog: https://pyup.io/changelogs/pytest-django/ - Docs: https://pytest-django.readthedocs.io/
--- {{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 a53e06182..d53966c32 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -26,4 +26,4 @@ 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-extensions==2.1.0 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.3.3 # https://github.com/pytest-dev/pytest-django +pytest-django==3.4.1 # https://github.com/pytest-dev/pytest-django From eb8e2a33c8df870cdb8ca19cdd16d7d94831fe20 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 18 Aug 2018 22:19:11 -0700 Subject: [PATCH 033/178] Update pytest to 3.7.2 (#1755) This PR updates [pytest](https://pypi.org/project/pytest) from **3.7.1** to **3.7.2**.
Changelog ### 3.7.2 ``` ========================= Bug Fixes --------- - `3671 <https://github.com/pytest-dev/pytest/issues/3671>`_: Fix ``filterwarnings`` not being registered as a builtin mark. - `3768 <https://github.com/pytest-dev/pytest/issues/3768>`_, `3789 <https://github.com/pytest-dev/pytest/issues/3789>`_: Fix test collection from packages mixed with normal directories. - `3771 <https://github.com/pytest-dev/pytest/issues/3771>`_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``. - `3774 <https://github.com/pytest-dev/pytest/issues/3774>`_: Fix bug where decorated fixtures would lose functionality (for example ``mock.patch``). - `3775 <https://github.com/pytest-dev/pytest/issues/3775>`_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``. - `3788 <https://github.com/pytest-dev/pytest/issues/3788>`_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``. - `3804 <https://github.com/pytest-dev/pytest/issues/3804>`_: Fix traceback reporting for exceptions with ``__cause__`` cycles. Improved Documentation ---------------------- - `3746 <https://github.com/pytest-dev/pytest/issues/3746>`_: Add documentation for ``metafunc.config`` that had been mistakenly hidden. ```
Links - PyPI: https://pypi.org/project/pytest - Changelog: https://pyup.io/changelogs/pytest/ - Homepage: http://pytest.org
--- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f2ff57d12..2d40d6c9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.2.1 -pytest==3.7.1 +pytest==3.7.2 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index d53966c32..c96913db4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.7.1 # https://github.com/pytest-dev/pytest +pytest==3.7.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 44b924b54f97ed4bc7f050a557fcb445e86d506f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 19 Aug 2018 03:20:31 -0700 Subject: [PATCH 034/178] Update argon2-cffi from 18.1.0 to 18.2.0 (#1756) --- {{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 68d8ddd71..846e8c18b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -4,7 +4,7 @@ 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 {%- endif %} -argon2-cffi==18.1.0 # https://github.com/hynek/argon2_cffi +argon2-cffi==18.2.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.0 # https://github.com/evansd/whitenoise {%- endif %} From c18a2fca8c5ddc5cf458f4f473bb07b036aed2e4 Mon Sep 17 00:00:00 2001 From: Denis Orehovsky Date: Sun, 19 Aug 2018 14:08:29 +0300 Subject: [PATCH 035/178] Run type checks in test_docker --- tests/test_docker.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 78c5717a6..0fd81604b 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -14,6 +14,9 @@ cd .cache/docker cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y cd my_awesome_project +# run the project's type checks +docker-compose -f local.yml run django mypy my_awesome_project + # run the project's tests docker-compose -f local.yml run django python manage.py pytest From 80e0862ff009e27e948138f66861b1db46e74686 Mon Sep 17 00:00:00 2001 From: Denis Orehovsky Date: Sun, 19 Aug 2018 14:22:33 +0300 Subject: [PATCH 036/178] Fix running tests in test_docker.sh file --- tests/test_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 78c5717a6..63a2f1998 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -15,7 +15,7 @@ cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y cd my_awesome_project # run the project's tests -docker-compose -f local.yml run django python manage.py pytest +docker-compose -f local.yml run django pytest # return non-zero status code if there are migrations that have not been created docker-compose -f local.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; } From e81f7abbd76ed519e73d5ef325b53355ebef03fd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 19 Aug 2018 06:05:42 -0700 Subject: [PATCH 037/178] Update argon2-cffi from 18.2.0 to 18.3.0 (#1758) --- {{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 846e8c18b..e3737aaec 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -4,7 +4,7 @@ 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 {%- endif %} -argon2-cffi==18.2.0 # https://github.com/hynek/argon2_cffi +argon2-cffi==18.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.0 # https://github.com/evansd/whitenoise {%- endif %} From 7485ac28be07e5c1c123dcf35b40ed770ca9a308 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 20 Aug 2018 12:35:24 -0700 Subject: [PATCH 038/178] Update pytest-django from 3.4.1 to 3.4.2 (#1760) --- {{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 c96913db4..691f76c6b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -26,4 +26,4 @@ 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-extensions==2.1.0 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.4.1 # https://github.com/pytest-dev/pytest-django +pytest-django==3.4.2 # https://github.com/pytest-dev/pytest-django From d95bdc6a378062382c536da07364bf8c46f8ea9c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 23 Aug 2018 01:30:49 -0700 Subject: [PATCH 039/178] Update sphinx from 1.7.6 to 1.7.7 (#1759) --- {{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 691f76c6b..9eeb4066f 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.6 # https://github.com/sphinx-doc/sphinx +Sphinx==1.7.7 # 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 967bdb89c3ba212b876c87dfdac21dbed9cbe762 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 27 Aug 2018 12:56:08 -0700 Subject: [PATCH 040/178] Update pytest to 3.7.3 (#1764) * Update pytest from 3.7.2 to 3.7.3 * Update pytest from 3.7.2 to 3.7.3 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2d40d6c9f..5d710316a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.2.1 -pytest==3.7.2 +pytest==3.7.3 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 9eeb4066f..47e99bcc7 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.7.2 # https://github.com/pytest-dev/pytest +pytest==3.7.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 95f543878725d4d2beb5ed89687a19eb18b7cf6a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 27 Aug 2018 18:22:54 -0700 Subject: [PATCH 041/178] Update django-extensions to 2.1.2 (#1770) This PR updates [django-extensions](https://pypi.org/project/django-extensions) from **2.1.0** to **2.1.2**.
Changelog ### 2.1.2 ``` ----- Changes: - Fix: AutoSlugField, fix check on list or tuple type ``` ### 2.1.1 ``` ----- ```
Links - PyPI: https://pypi.org/project/django-extensions - Changelog: https://pyup.io/changelogs/django-extensions/ - Repo: http://github.com/django-extensions/django-extensions
--- {{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 47e99bcc7..313e510c0 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -24,6 +24,6 @@ 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-extensions==2.1.0 # https://github.com/django-extensions/django-extensions +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 53945865d68a4cc8aa3f4a86d6da6609df4fc352 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 27 Aug 2018 18:24:02 -0700 Subject: [PATCH 042/178] Update django-allauth from 0.36.0 to 0.37.1 (#1768) --- {{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 e3737aaec..510ab3765 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -21,7 +21,7 @@ flower==0.9.2 # https://github.com/mher/flower django==2.0.8 # pyup: < 2.1 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils -django-allauth==0.36.0 # https://github.com/pennersr/django-allauth +django-allauth==0.37.1 # https://github.com/pennersr/django-allauth django-crispy-forms==1.7.2 # https://github.com/django-crispy-forms/django-crispy-forms {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.2 # https://github.com/django-compressor/django-compressor From 217976a8da5ebd7ba920267bffd9592a9665c3da Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 27 Aug 2018 20:01:58 -0700 Subject: [PATCH 043/178] Update django-anymail from 3.0 to 4.1 (#1769) --- {{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 d3b18ed92..21fe5bc4e 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]==3.0 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==4.1 # https://github.com/anymail/django-anymail From 4a090b86722eff4028fa848e4bb8db092fe3e2a5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 28 Aug 2018 17:53:58 -0700 Subject: [PATCH 044/178] Update sphinx to 1.7.8 (#1772) This PR updates [Sphinx](https://pypi.org/project/Sphinx) from **1.7.7** to **1.7.8**.
Changelog ### 1.7.8 ``` ===================================== Incompatible changes -------------------- * The type of ``env.included`` has been changed to dict of set Bugs fixed ---------- * 5320: intersphinx: crashed if invalid url given * 5326: manpage: crashed when invalid docname is specified as ``man_pages`` * 5322: autodoc: ``Any`` typehint causes formatting error * 5327: "document isn't included in any toctree" warning on rebuild with generated files * 5335: quickstart: escape sequence has been displayed with MacPorts' python ```
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 313e510c0..6e84beb10 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.7 # https://github.com/sphinx-doc/sphinx +Sphinx==1.7.8 # 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 20931dfb6f34fa80c14ca4596d2c3d3023d44858 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 30 Aug 2018 03:17:42 -0700 Subject: [PATCH 045/178] 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 046/178] 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 047/178] 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 048/178] 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 049/178] 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 050/178] 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 051/178] 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 052/178] 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 053/178] 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 054/178] 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 055/178] 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 056/178] 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 057/178] 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 058/178] 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 059/178] 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 060/178] 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 061/178] 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 062/178] 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 063/178] 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 064/178] 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 065/178] 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 066/178] 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 067/178] 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 6dd64ddd5316d2ecd610fc95fc3714b2b1245a5d Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 15 Sep 2018 21:23:06 +0100 Subject: [PATCH 068/178] Update documentation for bare metal local development - Mention the need for Redis if Celery is selected - Link to PostgreSQL & Redis download pages - Detail better how to set the environment - Improve internal links using Sphinx' :ref - Remove unused link --- docs/developing-locally.rst | 59 ++++++++++++++------ docs/live-reloading-and-sass-compilation.rst | 2 + {{cookiecutter.project_slug}}/.gitignore | 1 + 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 59079453c..8a5841653 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -9,24 +9,53 @@ Setting Up Development Environment Make sure to have the following on your host: -* virtualenv_; -* pip; -* PostgreSQL. +* Python 3.6 +* PostgreSQL_. +* Redis_, if using Celery First things first. -#. `Create a virtualenv`_. +#. Create a virtualenv: :: -#. Activate the virtualenv you have just created. + $ python3 -m venv + +#. Activate the virtualenv you have just created: :: + + $ source /bin/activate #. Install development requirements: :: $ pip install -r requirements/local.txt -#. Create a new PostgreSQL database (note: if this is the first time a database is created on your machine you might need to alter a localhost-related entry in your ``pg_hba.conf`` so as to utilize ``trust`` policy): :: +#. Create a new PostgreSQL database using createdb_: :: $ createdb + .. note:: + + if this is the first time a database is created on your machine you might need to alter + a localhost-related entry in your ``pg_hba.conf`` so as to utilize ``trust`` policy, see the + `postgres documentation`_ for more details. + +#. Set the environment variables for your database(s): :: + + $ export DATABASE_URL=postgres:// + # Optional: set broker URL if using Celery + $ export CELERY_BROKER_URL=redis://localhost:6379/0 + + .. note:: + + Check out the :ref:`settings` page for a comprehensive list of the environments variables. + + .. seealso:: + + To help setting up your environment variables, you have a few options: + + * create an ``.env`` file in the root of your project and define all the variables you need in it. + Then you just need to have ``DJANGO_READ_DOT_ENV_FILE=True`` in your machine and all the variables + will be read. + * Use a local environment manager like `direnv`_ + #. Apply migrations: :: $ python manage.py migrate @@ -35,8 +64,11 @@ First things first. $ python manage.py runserver 0.0.0.0:8000 -.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/ -.. _`Create a virtualenv`: https://virtualenv.pypa.io/en/stable/userguide/ +.. _PostgreSQL: https://www.postgresql.org/download/ +.. _Redis: https://redis.io/download +.. _createdb: https://www.postgresql.org/docs/current/static/app-createdb.html +.. _postgres documentation: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html +.. _direnv: https://direnv.net/ Setup Email Backend @@ -69,9 +101,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. -.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases -.. _`properly configured`: https://docs.djangoproject.com/en/dev/topics/email/#smtp-backend - +.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog Console ~~~~~~~ @@ -88,11 +118,8 @@ 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 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 - +If you’d like to take advantage of live reloading and Sass compilation you can do so with a little +bit of preparation, see :ref:`sass-compilation-live-reload`. Summary ------- diff --git a/docs/live-reloading-and-sass-compilation.rst b/docs/live-reloading-and-sass-compilation.rst index db8d681f2..a55b4fd8c 100644 --- a/docs/live-reloading-and-sass-compilation.rst +++ b/docs/live-reloading-and-sass-compilation.rst @@ -1,3 +1,5 @@ +.. _sass-compilation-live-reload: + Sass Compilation & Live Reloading ================================= diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 679fb9026..1eefea0f1 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -333,6 +333,7 @@ tags [Ss]cripts pyvenv.cfg pip-selfcheck.json +.env {% endif %} ### Project template From 49e12332e807d00507e409d43610134edb14d5fd Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 15 Sep 2018 21:23:29 +0100 Subject: [PATCH 069/178] Add a _static folder to silence Sphinx' warning --- docs/_static/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/_static/.gitkeep diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 000000000..e69de29bb From 993de2d4091bc6ded88c4add15ddabf26dfc1f6a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 15 Sep 2018 21:24:22 +0100 Subject: [PATCH 070/178] Remove unused details for installing PostgreSQL, link to the official website --- docs/index.rst | 1 - docs/installing_postgres.rst | 17 ----------------- 2 files changed, 18 deletions(-) delete mode 100644 docs/installing_postgres.rst diff --git a/docs/index.rst b/docs/index.rst index c9f70ab14..856b931f4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,6 @@ Contents: developing-locally-docker settings linters - live-reloading-and-sass-compilation deployment-on-pythonanywhere deployment-on-heroku deployment-with-docker diff --git a/docs/installing_postgres.rst b/docs/installing_postgres.rst deleted file mode 100644 index 3b37e8196..000000000 --- a/docs/installing_postgres.rst +++ /dev/null @@ -1,17 +0,0 @@ -PostgreSQL Installation Basics -============================== - -.. index:: pip, virtualenv, PostgreSQL - -The steps below will get you up and running with PostgreSQL. This assumes you have pip and virtualenv_ installed. - -.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/ - -On Mac - -Install PostgreSQLapp_ from the browser and move PostGresSQL into your applications folder. Then install PostgreSQL from HomeBrew_. - - $ brew install postgres - -.. _PostgreSQLapp: http://postgresapp.com/ -.. _HomeBrew: http://brew.sh/ \ No newline at end of file From c51fd710d264bba37afe99ff38ca5cd1355dd5aa Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 15 Sep 2018 21:25:40 +0100 Subject: [PATCH 071/178] Update settings page - Add a few missing settings - Remove outdated ones - Detail behaviour with URL for databases --- docs/settings.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 6e71a5151..26b161a09 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -1,7 +1,7 @@ .. _settings: Settings -========== +======== This project relies extensively on environment settings which **will not work with Apache/mod_wsgi setups**. It has been deployed successfully with both Gunicorn/Nginx and even uWSGI/Nginx. @@ -18,11 +18,10 @@ DJANGO_READ_DOT_ENV_FILE READ_DOT_ENV_FILE False ======================================= =========================== ============================================== ====================================================================== Environment Variable Django Setting Development Default Production Default ======================================= =========================== ============================================== ====================================================================== +DATABASE_URL DATABASES auto w/ Docker; postgres://project_slug w/o raises error DJANGO_ADMIN_URL n/a 'admin/' raises error -DJANGO_CACHES CACHES (default) locmem redis -DJANGO_DATABASES DATABASES (default) See code See code DJANGO_DEBUG DEBUG True False -DJANGO_SECRET_KEY SECRET_KEY !!!SET DJANGO_SECRET_KEY!!! raises error +DJANGO_SECRET_KEY SECRET_KEY auto-generated raises error DJANGO_SECURE_BROWSER_XSS_FILTER SECURE_BROWSER_XSS_FILTER n/a True DJANGO_SECURE_SSL_REDIRECT SECURE_SSL_REDIRECT n/a True DJANGO_SECURE_CONTENT_TYPE_NOSNIFF SECURE_CONTENT_TYPE_NOSNIFF n/a True @@ -41,6 +40,7 @@ The following table lists settings and their defaults for third-party applicatio ======================================= =========================== ============================================== ====================================================================== Environment Variable Django Setting Development Default Production Default ======================================= =========================== ============================================== ====================================================================== +CELERY_BROKER_URL CELERY_BROKER_URL auto w/ Docker; raises error w/o raises error DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a raises error DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error @@ -49,8 +49,6 @@ DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error MAILGUN_DOMAIN MAILGUN_SENDER_DOMAIN n/a raises error -NEW_RELIC_APP_NAME NEW_RELIC_APP_NAME n/a raises error -NEW_RELIC_LICENSE_KEY NEW_RELIC_LICENSE_KEY n/a raises error ======================================= =========================== ============================================== ====================================================================== -------------------------- From fa162dc970f8743088fc92d4bfb1fe31902c0056 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 15 Sep 2018 21:26:13 +0100 Subject: [PATCH 072/178] Update linters page for better syntax highlighting --- docs/linters.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/linters.rst b/docs/linters.rst index feb59d037..e59ff0df7 100644 --- a/docs/linters.rst +++ b/docs/linters.rst @@ -5,9 +5,9 @@ Linters flake8 -------- +------ -To run flake8: +To run flake8: :: $ flake8 @@ -19,7 +19,7 @@ The config for flake8 is located in setup.cfg. It specifies: pylint ------ -This is included in flake8's checks, but you can also run it separately to see a more detailed report: +This is included in flake8's checks, but you can also run it separately to see a more detailed report: :: $ pylint @@ -31,9 +31,9 @@ The config for pylint is located in .pylintrc. It specifies: * max-parents=13 pycodestyle ------ +----------- -This is included in flake8's checks, but you can also run it separately to see a more detailed report: +This is included in flake8's checks, but you can also run it separately to see a more detailed report: :: $ pycodestyle From 49a774085079326e41b2c5bc653f9dfd3f854992 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 16 Sep 2018 02:49:45 -0700 Subject: [PATCH 073/178] 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 46ab5aefc764770d4e0e0ddfcea4d6767b5501c4 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 16 Sep 2018 20:04:50 +0100 Subject: [PATCH 074/178] Use a more specific version of python for venv --- docs/developing-locally.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 8a5841653..719df0221 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -17,7 +17,7 @@ First things first. #. Create a virtualenv: :: - $ python3 -m venv + $ python3.6 -m venv #. Activate the virtualenv you have just created: :: From 3a611d4767cdf0cd1770c8716cac7a08f6692478 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 17 Sep 2018 22:07:26 +0100 Subject: [PATCH 075/178] 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 %} } } From 11bb4cdb84f5467e8487d73c305efe0d319b1246 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 17 Sep 2018 17:58:45 +0100 Subject: [PATCH 076/178] Avoid '$' in random string generation Until the [upstream bug](https://github.com/joke2k/django-environ/issues/60) is fixed in django-environ, this should prevent people using this template from hitting the bug. Fix #454 --- hooks/post_gen_project.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 669edb0ef..b43b08a5f 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -118,9 +118,11 @@ def generate_random_string( if using_ascii_letters: symbols += string.ascii_letters if using_punctuation: - symbols += string.punctuation.replace('"', "").replace("'", "").replace( - "\\", "" - ) + all_punctuation = set(string.punctuation) + # These symbols can cause issues in environment variables + unsuitable = {"'", '"', "\\", "$"} + suitable = all_punctuation.difference(unsuitable) + symbols += "".join(suitable) return "".join([random.choice(symbols) for _ in range(length)]) From 78fb8c14752faa9c5a74b4f4ed7ad4d3426505ae Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 20 Sep 2018 06:36:16 -0700 Subject: [PATCH 077/178] Update mypy from 0.620 to 0.630 (#1807) --- {{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 1b81011f3..db44da7af 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -mypy==0.620 # https://github.com/python/mypy +mypy==0.630 # https://github.com/python/mypy pytest==3.8.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar From c7055f38b80a5296dc219ec3e2c19829e6496ca1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 21 Sep 2018 09:02:29 -0700 Subject: [PATCH 078/178] Update tox from 3.2.1 to 3.4.0 (#1811) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7cf49ef6a..4a7d25b9b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ -tox==3.2.1 +tox==3.4.0 pytest==3.8.0 pytest-cookies==0.3.0 From f259e0f17a51509faadca0f1a29446120bbbe168 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 22 Sep 2018 13:18:11 -0700 Subject: [PATCH 079/178] Update sphinx from 1.8.0 to 1.8.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 db44da7af..724c3614e 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.8.0 # https://github.com/sphinx-doc/sphinx +Sphinx==1.8.1 # 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 b626fac5c6ec1a845fb7e8c8f8fd8576084ed41c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 25 Sep 2018 23:40:59 -0700 Subject: [PATCH 080/178] Update pytest to 3.8.1 (#1813) * Update pytest from 3.8.0 to 3.8.1 * Update pytest from 3.8.0 to 3.8.1 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4a7d25b9b..ff5809252 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.4.0 -pytest==3.8.0 +pytest==3.8.1 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 724c3614e..fbdd81af5 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.630 # https://github.com/python/mypy -pytest==3.8.0 # https://github.com/pytest-dev/pytest +pytest==3.8.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 0de682f22d76978d8af7b4ee80e721d9e1941b21 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 29 Sep 2018 12:24:28 +0100 Subject: [PATCH 081/178] Update database setup instructions for developing locally --- docs/developing-locally.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 719df0221..7d5591ac6 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -33,13 +33,15 @@ First things first. .. note:: - if this is the first time a database is created on your machine you might need to alter - a localhost-related entry in your ``pg_hba.conf`` so as to utilize ``trust`` policy, see the - `postgres documentation`_ for more details. + if this is the first time a database is created on your machine you might need an + `initial PostgreSQL set up`_ to allow local connections & set a password for + the ``postgres`` user. The `postgres documentation`_ explains the syntax of the config file + that you need to change. + #. Set the environment variables for your database(s): :: - $ export DATABASE_URL=postgres:// + $ export DATABASE_URL=postgres://postgres:@127.0.0.1:5432/ # Optional: set broker URL if using Celery $ export CELERY_BROKER_URL=redis://localhost:6379/0 @@ -67,6 +69,7 @@ First things first. .. _PostgreSQL: https://www.postgresql.org/download/ .. _Redis: https://redis.io/download .. _createdb: https://www.postgresql.org/docs/current/static/app-createdb.html +.. _initial PostgreSQL set up: http://suite.opengeo.org/docs/latest/dataadmin/pgGettingStarted/firstconnect.html .. _postgres documentation: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html .. _direnv: https://direnv.net/ From cc2602661e66ebbefe8a23eeaac9d7c24f776353 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 29 Sep 2018 18:18:21 -0500 Subject: [PATCH 082/178] Update django-extensions from 2.1.2 to 2.1.3 --- {{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 fbdd81af5..98f07d682 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -25,6 +25,6 @@ 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.1 # https://github.com/jazzband/django-debug-toolbar -django-extensions==2.1.2 # https://github.com/django-extensions/django-extensions +django-extensions==2.1.3 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.4.3 # https://github.com/pytest-dev/pytest-django From 32591ed655fbbfc3f5a4c006c381a7858b068540 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 1 Oct 2018 06:50:11 -0500 Subject: [PATCH 083/178] Update pillow from 5.2.0 to 5.3.0 --- {{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 93418b5f2..8f148d237 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2018.5 # https://github.com/stub42/pytz python-slugify==1.2.6 # https://github.com/un33k/python-slugify -Pillow==5.2.0 # https://github.com/python-pillow/Pillow +Pillow==5.3.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 {%- endif %} From a265756d480a38156acd680e26cfeaeeb3f5c6f2 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 1 Oct 2018 06:50:15 -0500 Subject: [PATCH 084/178] Update django from 2.0.8 to 2.0.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 93418b5f2..bfe20aa73 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -18,7 +18,7 @@ flower==0.9.2 # https://github.com/mher/flower # Django # ------------------------------------------------------------------------------ -django==2.0.8 # pyup: < 2.1 # https://www.djangoproject.com/ +django==2.0.9 # pyup: < 2.1 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils django-allauth==0.37.1 # https://github.com/pennersr/django-allauth From 57f6b8dac2ce526860d36e1ec1c8898c1251216e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 3 Oct 2018 07:09:28 -0500 Subject: [PATCH 085/178] Update pytest from 3.8.1 to 3.8.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ff5809252..eb992ed73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.4.0 -pytest==3.8.1 +pytest==3.8.2 pytest-cookies==0.3.0 From 8ae766b7e5b8ad635c0b02b27f0195984ceee9b8 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 3 Oct 2018 07:09:30 -0500 Subject: [PATCH 086/178] Update pytest from 3.8.1 to 3.8.2 --- {{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 98f07d682..c8b8d9be4 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.630 # https://github.com/python/mypy -pytest==3.8.1 # https://github.com/pytest-dev/pytest +pytest==3.8.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 06b80fc871b7aca9de0d7736a4e0abef50971751 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 3 Oct 2018 16:15:29 -0500 Subject: [PATCH 087/178] Update django-allauth from 0.37.1 to 0.38.0 --- {{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 918edd45d..8d0a4144a 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -21,7 +21,7 @@ flower==0.9.2 # https://github.com/mher/flower django==2.0.9 # pyup: < 2.1 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils -django-allauth==0.37.1 # https://github.com/pennersr/django-allauth +django-allauth==0.38.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.7.2 # https://github.com/django-crispy-forms/django-crispy-forms {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.2 # https://github.com/django-compressor/django-compressor From dd71966ca1deea600162d5ea19ada94ec559da6e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 9 Oct 2018 13:52:37 -0700 Subject: [PATCH 088/178] Update tox from 3.4.0 to 3.5.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ff5809252..f87427022 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ -tox==3.4.0 +tox==3.5.2 pytest==3.8.1 pytest-cookies==0.3.0 From 5ef7522436320d45ea5458cb5a4d0f9a8b78bf90 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 9 Oct 2018 13:52:46 -0700 Subject: [PATCH 089/178] Update gunicorn from 19.8.1 to 19.9.0 --- {{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 3a138303c..410cdc92a 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r ./base.txt -gunicorn==19.8.1 # https://github.com/benoitc/gunicorn +gunicorn==19.9.0 # https://github.com/benoitc/gunicorn psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==0.6.2 # https://github.com/antonagestam/collectfast From 9e8e09119d5e7065fd2435b5bfe64fdfd0126816 Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Wed, 10 Oct 2018 21:35:17 -0600 Subject: [PATCH 090/178] Remove requirements.txt file from delete list. fixes #1829 --- 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 b43b08a5f..af2523e7e 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -69,7 +69,7 @@ def remove_utility_files(): def remove_heroku_files(): - file_names = ["Procfile", "runtime.txt", "requirements.txt"] + file_names = ["Procfile", "runtime.txt"] for file_name in file_names: os.remove(file_name) From 00177b838f264e51ff2c5b2fc7f71e5ea7153549 Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Wed, 10 Oct 2018 21:42:23 -0600 Subject: [PATCH 091/178] Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index c17c951ef..d6c0d9363 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -78,6 +78,7 @@ Listed in alphabetical order. Chris Franklin `@hairychris`_ Chris Pappalardo `@ChrisPappalardo`_ Christopher Clarke `@chrisdev`_ + Cole Mackenzie `@cmackenzie1`_ Collederas `@Collederas`_ Cristian Vargas `@cdvv7788`_ Cullen Rhodes `@c-rhodes`_ @@ -198,6 +199,7 @@ Listed in alphabetical order. .. _@chrisdev: https://github.com/chrisdev .. _@ChrisPappalardo: https://github.com/ChrisPappalardo .. _@chuckus: https://github.com/chuckus +.. _@cmackenzie1: https://github.com/cmackenzie1 .. _@Collederas: https://github.com/Collederas .. _@ddiazpinto: https://github.com/ddiazpinto .. _@dezoito: https://github.com/dezoito From c0487b667f3622c895e63788c0fb13e9406324de Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 11 Oct 2018 20:41:15 -0700 Subject: [PATCH 092/178] Update django-anymail from 4.2 to 4.3 (#1831) --- {{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 410cdc92a..40af972d2 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.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 +django-anymail[mailgun]==4.3 # https://github.com/anymail/django-anymail \ No newline at end of file From 9c9c831541b6459aed37fc48787d08441348856c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 15 Oct 2018 19:13:36 -0700 Subject: [PATCH 093/178] Update mypy from 0.630 to 0.641 (#1832) --- {{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 c8b8d9be4..d0ebb27ef 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -mypy==0.630 # https://github.com/python/mypy +mypy==0.641 # https://github.com/python/mypy pytest==3.8.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar From 5a4a3217f19c7ac3414a26dc5dab68897c63645e Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Tue, 16 Oct 2018 13:22:04 -0600 Subject: [PATCH 094/178] prevent removal if using travisci --- hooks/post_gen_project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index af2523e7e..45435dd02 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -69,8 +69,11 @@ def remove_utility_files(): def remove_heroku_files(): - file_names = ["Procfile", "runtime.txt"] + file_names = ["Procfile", "runtime.txt", "requirements.txt"] for file_name in file_names: + if file_name == "requirements.txt" and "{{ cookiecutter.use_travisci }}".lower() == "y": + # don't remove the file if we are using travisci but not using heroku + continue os.remove(file_name) From 2ca14c05d0c9ae0dde50d2f65c56f7a96d38fc15 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 17 Oct 2018 07:05:54 -0500 Subject: [PATCH 095/178] Update pytest from 3.8.2 to 3.9.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 379ae48ca..ba3d77d22 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.2 -pytest==3.8.2 +pytest==3.9.1 pytest-cookies==0.3.0 From 784f6c9ca7ac9cecbb15cc2bfb51500ddd18bda0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 17 Oct 2018 07:05:55 -0500 Subject: [PATCH 096/178] Update pytest from 3.8.2 to 3.9.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 d0ebb27ef..fbc29befc 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.641 # https://github.com/python/mypy -pytest==3.8.2 # https://github.com/pytest-dev/pytest +pytest==3.9.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From f5df324920e4d8220e8506517a2f7399a284993f Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 18 Oct 2018 09:46:59 -0500 Subject: [PATCH 097/178] Update djangorestframework from 3.8.2 to 3.9.0 --- {{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 8d0a4144a..7ad31975b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -29,5 +29,5 @@ django-compressor==2.2 # https://github.com/django-compressor/django-compressor django-redis==4.9.0 # https://github.com/niwinz/django-redis # Django REST Framework -djangorestframework==3.8.2 # https://github.com/encode/django-rest-framework +djangorestframework==3.9.0 # https://github.com/encode/django-rest-framework coreapi==2.3.3 # https://github.com/core-api/python-client From 649ca872d2a7e203650fd2da014800d928647589 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 23 Oct 2018 10:23:23 -0700 Subject: [PATCH 098/178] Update pytest to 3.9.2 (#1837) * Update pytest from 3.9.1 to 3.9.2 * Update pytest from 3.9.1 to 3.9.2 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ba3d77d22..cdb7b49f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.2 -pytest==3.9.1 +pytest==3.9.2 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index fbc29befc..db907531f 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.641 # https://github.com/python/mypy -pytest==3.9.1 # https://github.com/pytest-dev/pytest +pytest==3.9.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 9d4566e52cf36e9f0977706ead35a16523968f99 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Fri, 19 Oct 2018 10:01:10 +0300 Subject: [PATCH 099/178] Add Postgres 10.5 version support --- CONTRIBUTORS.rst | 4 +++- cookiecutter.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index c17c951ef..d66f7fc97 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -106,6 +106,7 @@ Listed in alphabetical order. Irfan Ahmad `@erfaan`_ @erfaan Jan Van Bruggen `@jvanbrug`_ Jens Nilsson `@phiberjenz`_ + Jerome Leclanche `@jleclanche`_ @Adys Jimmy Gitonga `@afrowave`_ @afrowave John Cass `@jcass77`_ @cass_john Julien Almarcha `@sladinji`_ @@ -216,12 +217,13 @@ Listed in alphabetical order. .. _@goldhand: https://github.com/goldhand .. _@hackebrot: https://github.com/hackebrot .. _@hairychris: https://github.com/hairychris -.. _@hendrikschneider https://github.com/hendrikschneider +.. _@hendrikschneider: https://github.com/hendrikschneider .. _@hjwp: https://github.com/hjwp .. _@IanLee1521: https://github.com/IanLee1521 .. _@ikkebr: https://github.com/ikkebr .. _@iynaix: https://github.com/iynaix .. _@jazztpt: https://github.com/jazztpt +.. _@jleclanche: https://github.com/jleclanche .. _@juliocc: https://github.com/juliocc .. _@jvanbrug: https://github.com/jvanbrug .. _@ka7eh: https://github.com/ka7eh diff --git a/cookiecutter.json b/cookiecutter.json index 21a639a3a..9aff23f22 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -18,6 +18,7 @@ "use_pycharm": "n", "use_docker": "n", "postgresql_version": [ + "10.5", "10.4", "10.3", "10.2", From 25477ac33d831781f7da047495ddad6386790ac0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 24 Oct 2018 03:36:29 -0700 Subject: [PATCH 100/178] Update pytz from 2018.5 to 2018.6 (#1840) --- {{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 7ad31975b..33c7ea271 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2018.5 # https://github.com/stub42/pytz +pytz==2018.6 # https://github.com/stub42/pytz python-slugify==1.2.6 # https://github.com/un33k/python-slugify Pillow==5.3.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} From ef2fc781f82058a1213147fea29b86a1d0a59fbd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 24 Oct 2018 03:36:48 -0700 Subject: [PATCH 101/178] Update flake8 to 3.6.0 (#1839) * Update flake8 from 3.5.0 to 3.6.0 * Update flake8 from 3.5.0 to 3.6.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index cdb7b49f5..b89cde996 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -flake8==3.5.0 +flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index db907531f..120187fec 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -17,7 +17,7 @@ pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ -flake8==3.5.0 # https://github.com/PyCQA/flake8 +flake8==3.6.0 # https://github.com/PyCQA/flake8 coverage==4.5.1 # https://github.com/nedbat/coveragepy # Django From 6cb59c6ca474926d9e65a0f9a0a37651ede9021d Mon Sep 17 00:00:00 2001 From: Davit Tovmasyan Date: Wed, 24 Oct 2018 14:37:15 +0400 Subject: [PATCH 102/178] Keep ipython history (#1836) --- CONTRIBUTORS.rst | 2 ++ {{cookiecutter.project_slug}}/.envs/.local/.django | 1 + {{cookiecutter.project_slug}}/.gitignore | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index d66f7fc97..509fb83ae 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -85,6 +85,7 @@ Listed in alphabetical order. Daniel Hepper `@dhepper`_ @danielhepper Daniele Tricoli `@eriol`_ David Díaz `@ddiazpinto`_ @DavidDiazPinto + Davit Tovmasyan `@davitovmasyan`_ Davur Clementsen `@dsclementsen`_ @davur Delio Castillo `@jangeador`_ @jangeador Denis Orehovsky `@apirobot`_ @@ -200,6 +201,7 @@ Listed in alphabetical order. .. _@ChrisPappalardo: https://github.com/ChrisPappalardo .. _@chuckus: https://github.com/chuckus .. _@Collederas: https://github.com/Collederas +.. _@davitovmasyan: https://github.com/davitovmasyan .. _@ddiazpinto: https://github.com/ddiazpinto .. _@dezoito: https://github.com/dezoito .. _@dhepper: https://github.com/dhepper diff --git a/{{cookiecutter.project_slug}}/.envs/.local/.django b/{{cookiecutter.project_slug}}/.envs/.local/.django index d94a17e59..2ed5fbf3d 100644 --- a/{{cookiecutter.project_slug}}/.envs/.local/.django +++ b/{{cookiecutter.project_slug}}/.envs/.local/.django @@ -1,6 +1,7 @@ # General # ------------------------------------------------------------------------------ USE_DOCKER=yes +IPYTHONDIR=/app/.ipython # Redis # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 1eefea0f1..1874e9d92 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -343,3 +343,7 @@ MailHog {{ cookiecutter.project_slug }}/media/ .pytest_cache/ + +{% if cookiecutter.use_docker == 'y' %} +.ipython/ +{%- endif %} From 6c24de9c0fd5fa44dc489eee05ea7bc3e913d406 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 28 Oct 2018 01:35:57 -0700 Subject: [PATCH 103/178] Update pytest to 3.9.3 (#1842) * Update pytest from 3.9.2 to 3.9.3 * Update pytest from 3.9.2 to 3.9.3 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index b89cde996..6ca5fa01c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.2 -pytest==3.9.2 +pytest==3.9.3 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 120187fec..fb36662c1 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.641 # https://github.com/python/mypy -pytest==3.9.2 # https://github.com/pytest-dev/pytest +pytest==3.9.3 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From cee7516dc4fbee695d845d705e1de8a343d28d45 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 29 Oct 2018 12:15:43 -0700 Subject: [PATCH 104/178] Update tox from 3.5.2 to 3.5.3 (#1843) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6ca5fa01c..b62ff07df 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ -tox==3.5.2 +tox==3.5.3 pytest==3.9.3 pytest-cookies==0.3.0 From ee67e6019d67a5950082ac496ade82382e8340f5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 29 Oct 2018 12:15:57 -0700 Subject: [PATCH 105/178] Update pytz from 2018.6 to 2018.7 (#1845) --- {{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 33c7ea271..d33801688 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2018.6 # https://github.com/stub42/pytz +pytz==2018.7 # https://github.com/stub42/pytz python-slugify==1.2.6 # https://github.com/un33k/python-slugify Pillow==5.3.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} From 36075be6dc825d5304c66bd06a21538d3c593f1f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 4 Nov 2018 23:31:50 -0800 Subject: [PATCH 106/178] Update pytest to 3.10.0 (#1848) * Update pytest from 3.9.3 to 3.10.0 * Update pytest from 3.9.3 to 3.10.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index b62ff07df..a3f3eb081 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.3 -pytest==3.9.3 +pytest==3.10.0 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index fb36662c1..dc5b97029 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.641 # https://github.com/python/mypy -pytest==3.9.3 # https://github.com/pytest-dev/pytest +pytest==3.10.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 33eb8fbe2559121e6448d6f55e9c068a817fe114 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Nov 2018 11:04:24 -0800 Subject: [PATCH 107/178] Update django-anymail from 4.3 to 5.0 (#1851) --- {{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 40af972d2..90953d4b0 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.7.1 # https://github.com/jschneier/django-storages -django-anymail[mailgun]==4.3 # https://github.com/anymail/django-anymail \ No newline at end of file +django-anymail[mailgun]==5.0 # https://github.com/anymail/django-anymail \ No newline at end of file From 03e5670c25c8e33cf7f85e94d024d2094af27154 Mon Sep 17 00:00:00 2001 From: HP Bruna Date: Wed, 7 Nov 2018 21:54:52 +0100 Subject: [PATCH 108/178] CSRF in header CSRF header is needed for a POST request in the Django REST framework. --- {{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile index c2bf241c7..323e43922 100644 --- a/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile +++ b/{{cookiecutter.project_slug}}/compose/production/caddy/Caddyfile @@ -7,6 +7,7 @@ www.{% raw %}{$DOMAIN_NAME}{% endraw %} { header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream X-Forwarded-Proto {scheme} + header_upstream X-CSRFToken {~csrftoken} } log stdout errors stdout From ca0265324ef779fcae8ec009a0018683a88be4bf Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 8 Nov 2018 15:12:21 -0800 Subject: [PATCH 109/178] Update pytest-sugar from 0.9.1 to 0.9.2 (#1854) --- {{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 dc5b97029..d91b7bdad 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # ------------------------------------------------------------------------------ mypy==0.641 # https://github.com/python/mypy pytest==3.10.0 # https://github.com/pytest-dev/pytest -pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar +pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ From e15a0bac8fbf562b2c810102aaa03b412c8850fc Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 11 Nov 2018 08:44:40 -0800 Subject: [PATCH 110/178] Update sphinx from 1.8.1 to 1.8.2 --- {{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 d91b7bdad..c94631735 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.8.1 # https://github.com/sphinx-doc/sphinx +Sphinx==1.8.2 # 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 ecf9b681298558cc68fbf79c11241f434983533e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 11 Nov 2018 08:44:44 -0800 Subject: [PATCH 111/178] Update psycopg2-binary from 2.7.5 to 2.7.6.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 d91b7bdad..a25aa9f35 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -6,7 +6,7 @@ Sphinx==1.8.1 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} -psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 +psycopg2-binary==2.7.6.1 # https://github.com/psycopg/psycopg2 {%- endif %} # Testing From 45d8d4a1c6ccdfcac8b05819ccdc271a66baf04e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 11 Nov 2018 10:12:42 -0800 Subject: [PATCH 112/178] Update pytest from 3.10.0 to 3.10.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a3f3eb081..f93aa76ad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.3 -pytest==3.10.0 +pytest==3.10.1 pytest-cookies==0.3.0 From 821e895323948e24ec7ef2e977c42ae31063aba2 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 11 Nov 2018 10:12:43 -0800 Subject: [PATCH 113/178] Update pytest from 3.10.0 to 3.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 d91b7bdad..5327b917d 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.641 # https://github.com/python/mypy -pytest==3.10.0 # https://github.com/pytest-dev/pytest +pytest==3.10.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From 8217ea439b390c09d8ac49e72b3af39521db602e Mon Sep 17 00:00:00 2001 From: Leo Zhou Date: Mon, 12 Nov 2018 17:59:26 +0800 Subject: [PATCH 114/178] Config celery app immediately after the app being created, otherwise it is too late. --- CONTRIBUTORS.rst | 2 ++ .../{{cookiecutter.project_slug}}/taskapp/celery.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 509fb83ae..302b819e2 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -121,6 +121,7 @@ Listed in alphabetical order. Krzysztof Szumny `@noisy`_ Krzysztof Żuraw `@krzysztofzuraw`_ Leonardo Jimenez `@xpostudio4`_ + Leo Zhou `@glasslion`_ Lin Xianyi `@iynaix`_ Luis Nell `@originell`_ Lukas Klein @@ -217,6 +218,7 @@ Listed in alphabetical order. .. _@garry-cairns: https://github.com/garry-cairns .. _@garrypolley: https://github.com/garrypolley .. _@goldhand: https://github.com/goldhand +.. _@glasslion: https://github.com/glasslion .. _@hackebrot: https://github.com/hackebrot .. _@hairychris: https://github.com/hairychris .. _@hendrikschneider: https://github.com/hendrikschneider diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py index b3f0a388b..570abc125 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py @@ -11,6 +11,11 @@ if not settings.configured: app = Celery('{{cookiecutter.project_slug}}') +# Using a string here means the worker will not have to +# pickle the object when using Windows. +# - namespace='CELERY' means all celery-related configuration keys +# should have a `CELERY_` prefix. +app.config_from_object('django.conf:settings', namespace='CELERY') class CeleryAppConfig(AppConfig): @@ -18,11 +23,6 @@ class CeleryAppConfig(AppConfig): verbose_name = 'Celery Config' def ready(self): - # Using a string here means the worker will not have to - # pickle the object when using Windows. - # - namespace='CELERY' means all celery-related configuration keys - # should have a `CELERY_` prefix. - app.config_from_object('django.conf:settings', namespace='CELERY') installed_apps = [app_config.name for app_config in apps.get_app_configs()] app.autodiscover_tasks(lambda: installed_apps, force=True) From 175381213672b409f940730c2bafc129815d5595 Mon Sep 17 00:00:00 2001 From: Carl Johnson Date: Mon, 12 Nov 2018 15:04:03 -0500 Subject: [PATCH 115/178] Settings: Use security settings in dev as well as prod --- {{cookiecutter.project_slug}}/config/settings/base.py | 11 +++++++++++ .../config/settings/production.py | 8 -------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index e4ab28844..950b9ed7f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -209,6 +209,17 @@ FIXTURE_DIRS = ( str(APPS_DIR.path('fixtures')), ) +# SECURITY +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-httponly +SESSION_COOKIE_HTTPONLY = True +# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-httponly +CSRF_COOKIE_HTTPONLY = True +# https://docs.djangoproject.com/en/dev/ref/settings/#secure-browser-xss-filter +SECURE_BROWSER_XSS_FILTER = True +# https://docs.djangoproject.com/en/dev/ref/settings/#x-frame-options +X_FRAME_OPTIONS = 'DENY' + # EMAIL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#email-backend diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 87753b552..e77d4304c 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -41,12 +41,8 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_SSL_REDIRECT = env.bool('DJANGO_SECURE_SSL_REDIRECT', default=True) # https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure SESSION_COOKIE_SECURE = True -# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-httponly -SESSION_COOKIE_HTTPONLY = True # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure CSRF_COOKIE_SECURE = True -# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-httponly -CSRF_COOKIE_HTTPONLY = True # https://docs.djangoproject.com/en/dev/topics/security/#ssl-https # https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds # TODO: set this to 60 seconds first and then to 518400 once you prove the former works @@ -57,10 +53,6 @@ SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool('DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS SECURE_HSTS_PRELOAD = env.bool('DJANGO_SECURE_HSTS_PRELOAD', default=True) # https://docs.djangoproject.com/en/dev/ref/middleware/#x-content-type-options-nosniff SECURE_CONTENT_TYPE_NOSNIFF = env.bool('DJANGO_SECURE_CONTENT_TYPE_NOSNIFF', default=True) -# https://docs.djangoproject.com/en/dev/ref/settings/#secure-browser-xss-filter -SECURE_BROWSER_XSS_FILTER = True -# https://docs.djangoproject.com/en/dev/ref/settings/#x-frame-options -X_FRAME_OPTIONS = 'DENY' # STORAGES # ------------------------------------------------------------------------------ From 65a506a9453738b8dc24964e8a33969ca2f1efd2 Mon Sep 17 00:00:00 2001 From: Carl Johnson Date: Mon, 12 Nov 2018 15:07:24 -0500 Subject: [PATCH 116/178] Contributors: Add Carl Johnson --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 302b819e2..35508eb76 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -70,6 +70,7 @@ Listed in alphabetical order. Bouke Haarsma Brent Payne `@brentpayne`_ @brentpayne Burhan Khalid            `@burhan`_                   @burhan + Carl Johnson `@carlmjohnson`_ @carlmjohnson Catherine Devlin `@catherinedevlin`_ Cédric Gaspoz `@cgaspoz`_ Charlie Smith `@chuckus`_ @@ -194,6 +195,7 @@ Listed in alphabetical order. .. _@burhan: https://github.com/burhan .. _@c-rhodes: https://github.com/c-rhodes .. _@caffodian: https://github.com/caffodian +.. _@carlmjohnson: https://github.com/carlmjohnson .. _@catherinedevlin: https://github.com/catherinedevlin .. _@ccurvey: https://github.com/ccurvey .. _@cdvv7788: https://github.com/cdvv7788 From 7e03b56694ad585c4eed328e147ee1a4de58ece5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 12 Nov 2018 16:08:45 -0800 Subject: [PATCH 117/178] Update whitenoise from 4.1 to 4.1.1 --- {{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 d33801688..f46bee9d7 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.1 # https://github.com/evansd/whitenoise +whitenoise==4.1.1 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} From 7627ce4c308ba0851ea14390c5d6c6217fd0e1e0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 12 Nov 2018 16:08:48 -0800 Subject: [PATCH 118/178] Update coverage from 4.5.1 to 4.5.2 --- {{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 6515e3819..d0df6506c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality # ------------------------------------------------------------------------------ flake8==3.6.0 # https://github.com/PyCQA/flake8 -coverage==4.5.1 # https://github.com/nedbat/coveragepy +coverage==4.5.2 # https://github.com/nedbat/coveragepy # Django # ------------------------------------------------------------------------------ From c6fd1c1905d5510465ad6c2e5770072a3f728ca8 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 13 Nov 2018 07:24:27 -0800 Subject: [PATCH 119/178] Update pytest-django from 3.4.3 to 3.4.4 (#1864) --- {{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 d0df6506c..7039cc1a7 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.3 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.4.3 # https://github.com/pytest-dev/pytest-django +pytest-django==3.4.4 # https://github.com/pytest-dev/pytest-django From 4e39a9f8f0c06df60d64e0e02ff912aca68dd50e Mon Sep 17 00:00:00 2001 From: Peter Coles Date: Wed, 14 Nov 2018 14:23:31 -0500 Subject: [PATCH 120/178] strip dots in default project_slug (#1865) This removes periods from the auto-generated project_slug (and also runs trim for good measure). Otherwise if you have a "." in your project name (e.g., you used a website domain name as your project name), you will encounter an error about it failing for a `project_slug.isidentifier()` check. Update: changed "." to be replace with "_" instead of "", per request from @webyneter --- CONTRIBUTORS.rst | 1 + cookiecutter.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 35508eb76..b64828956 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -144,6 +144,7 @@ Listed in alphabetical order. Pablo `@oubiga`_ Parbhat Puri `@parbhat`_ Peter Bittner `@bittner`_ + Peter Coles `@mrcoles`_ Pierre Chiquet `@pchiquet`_ Raphael Pierzina `@hackebrot`_ Raony Guimarães Corrêa `@raonyguimaraes`_ diff --git a/cookiecutter.json b/cookiecutter.json index 9aff23f22..b5dda0c70 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,6 +1,6 @@ { "project_name": "My Awesome Project", - "project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_') }}", + "project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_')|trim() }}", "description": "Behold My Awesome Project!", "author_name": "Daniel Roy Greenfeld", "domain_name": "example.com", From f439e935a852e06ad0c6a752ad912073ab684443 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 17 Nov 2018 01:59:09 -0800 Subject: [PATCH 121/178] Update pytest to 4.0.0 (#1867) * Update pytest from 3.10.1 to 4.0.0 * Update pytest from 3.10.1 to 4.0.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f93aa76ad..b965c06f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.3 -pytest==3.10.1 +pytest==4.0.0 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 7039cc1a7..f11498272 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.7.6.1 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.641 # https://github.com/python/mypy -pytest==3.10.1 # https://github.com/pytest-dev/pytest +pytest==4.0.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From 197ab7f36ebe40c542845d8a13d12e839097da8f Mon Sep 17 00:00:00 2001 From: canonnervio Date: Sat, 17 Nov 2018 10:59:38 +0100 Subject: [PATCH 122/178] Modified command for Windows users (#1850) * Modified command for Windows users Added comment to use double quotes for heroku pg:backups setup under Windows. * Added name to list --- CONTRIBUTORS.rst | 1 + docs/deployment-on-heroku.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index b64828956..cc0f52bc4 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -174,6 +174,7 @@ Listed in alphabetical order. William Archinal `@archinal`_ Yaroslav Halchenko Denis Bobrov `@delneg`_ + Philipp Matthies `@canonnervio`_ ========================== ============================ ============== .. _@a7p: https://github.com/a7p diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index d7d95184d..f753aa5a4 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -10,6 +10,8 @@ Run these commands to deploy the project to Heroku: heroku create --buildpack https://github.com/heroku/heroku-buildpack-python heroku addons:create heroku-postgresql:hobby-dev + # On Windows use double quotes for the time zone, e.g. + # heroku pg:backups schedule --at "02:00 America/Los_Angeles" DATABASE_URL heroku pg:backups schedule --at '02:00 America/Los_Angeles' DATABASE_URL heroku pg:promote DATABASE_URL From ff6d331a203b11b9884bd84a76fbe2788b6fba6c Mon Sep 17 00:00:00 2001 From: Vadim Iskuchekov Date: Sun, 18 Nov 2018 17:06:07 +0100 Subject: [PATCH 123/178] Pinning redis version to >=2.10.6, <3 Fix #1868 --- {{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 f46bee9d7..e61612a3c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -8,7 +8,7 @@ argon2-cffi==18.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.1.1 # https://github.com/evansd/whitenoise {%- endif %} -redis>=2.10.5 # https://github.com/antirez/redis +redis>=2.10.6 # pyup: <3 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} celery==4.2.1 # pyup: <5.0 # https://github.com/celery/celery {%- if cookiecutter.use_docker == 'y' %} From d1ee17afb9d1e2e6d6c1c29333049d10c29aa5fc Mon Sep 17 00:00:00 2001 From: Vadim Iskuchekov Date: Sun, 18 Nov 2018 17:09:31 +0100 Subject: [PATCH 124/178] Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index cc0f52bc4..b7f484443 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -175,6 +175,7 @@ Listed in alphabetical order. Yaroslav Halchenko Denis Bobrov `@delneg`_ Philipp Matthies `@canonnervio`_ + Vadim Iskuchekov `@Egregors`_ @egregors ========================== ============================ ============== .. _@a7p: https://github.com/a7p From e407eb9c13d4a22955358f1a0df0a74e1e7e5699 Mon Sep 17 00:00:00 2001 From: Vadim Iskuchekov Date: Sun, 18 Nov 2018 18:49:55 +0100 Subject: [PATCH 125/178] Clean up, version restriction not only for pyup Default pip ignored # pyup notation. So now version restriction sets decidedly --- {{cookiecutter.project_slug}}/requirements/base.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index e61612a3c..e7f4b0385 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -8,9 +8,9 @@ argon2-cffi==18.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.1.1 # https://github.com/evansd/whitenoise {%- endif %} -redis>=2.10.6 # pyup: <3 # https://github.com/antirez/redis +redis>=2.10.6, < 3 # pyup: < 3 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} -celery==4.2.1 # pyup: <5.0 # https://github.com/celery/celery +celery==4.2.1 # pyup: < 5.0 # https://github.com/celery/celery {%- if cookiecutter.use_docker == 'y' %} flower==0.9.2 # https://github.com/mher/flower {%- endif %} From 0d5ce3c032ec28409997a251b7cc67e9d190bde6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 19 Nov 2018 02:19:54 -0800 Subject: [PATCH 126/178] Update django-redis from 4.9.0 to 4.10.0 --- {{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 f46bee9d7..9f7c02f1e 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -26,7 +26,7 @@ django-crispy-forms==1.7.2 # https://github.com/django-crispy-forms/django-cris {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.2 # https://github.com/django-compressor/django-compressor {%- endif %} -django-redis==4.9.0 # https://github.com/niwinz/django-redis +django-redis==4.10.0 # https://github.com/niwinz/django-redis # Django REST Framework djangorestframework==3.9.0 # https://github.com/encode/django-rest-framework From 53940411cc96f21f9ed77b3ff241844eb0b2c57d Mon Sep 17 00:00:00 2001 From: Afrowave Date: Tue, 20 Nov 2018 00:06:54 +0300 Subject: [PATCH 127/178] EDITED the developing locally doc. --- docs/developing-locally.rst | 2 +- docs/index.rst | 1 + docs/testing.rst | 56 +++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 docs/testing.rst diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 7d5591ac6..09c5db396 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -29,7 +29,7 @@ First things first. #. Create a new PostgreSQL database using createdb_: :: - $ createdb + $ createdb -U postgres --password .. note:: diff --git a/docs/index.rst b/docs/index.rst index 856b931f4..5cb07b4b0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,7 @@ Contents: developing-locally-docker settings linters + testing deployment-on-pythonanywhere deployment-on-heroku deployment-with-docker diff --git a/docs/testing.rst b/docs/testing.rst new file mode 100644 index 000000000..6ca213883 --- /dev/null +++ b/docs/testing.rst @@ -0,0 +1,56 @@ +.. _testing: + +Testing +======== + +We encourage users to build application tests. As best practice, this should be done immediately after documentation of the application being built, before starting on any coding. + +Pytest +------ + +This project uses the Pytest_, a framework for easily building simple and scalable tests. +After you have set up to `develop locally`_, run the following commands to make sure the testing environment is ready: :: + + $ pytest + +You will get a readout of the `users` app that has already been set up with tests. If you do not want to run the `pytest` on the entire project, you can target a particular app by typing in its location: :: + + $ pytest + +If you set up your project to `develop locally with docker`_, run the following command: :: + + $ docker-compose -f local.yml run django pytest + +Targetting particular apps for testing in ``docker`` follows a similar pattern as previously shown above. + +Coverage +-------- + +You should build your tests to provide the highest level of **code coverage**. You can run the ``pytest`` with code ``coverage`` by typing in the following command: :: + + $ docker-compose -f local.yml run django coverage run -m pytest + +Once the tests are complete, in order to see the code coverage, run the following command: :: + + $ docker-compose -f local.yml run django coverage report + +.. note:: + + At the root of the project folder, you will find the `pytest.ini` file. You can use this to customize_ the ``pytest`` to your liking. + + There is also the `.coveragerc`. This is the configuration file for the ``coverage`` tool. You can find out more about `configuring`_ ``coverage``. + +.. seealso:: + + For unit tests, run: :: + + $ python manage.py test + + Since this is a fresh install, and there are no tests built using the Python `unittest`_ library yet, you should get feedback that says there were no tests carried out. + +.. _Pytest: https://docs.pytest.org/en/latest/example/simple.html +.. _develop locally: ../developing-locally.rst +.. _develop locally with docker: ..../developing-locally-docker.rst +.. _customize: https://docs.pytest.org/en/latest/customize.html +.. _unittest: https://docs.python.org/3/library/unittest.html#module-unittest +.. _configuring: https://coverage.readthedocs.io/en/v4.5.x/config.html \ No newline at end of file From a598a0a67a6e1942efca8e1862c397e6f187734a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 19 Nov 2018 18:10:30 -0800 Subject: [PATCH 128/178] Update whitenoise from 4.1.1 to 4.1.2 (#1872) --- {{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 9f7c02f1e..2ccdb04a8 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.1.1 # https://github.com/evansd/whitenoise +whitenoise==4.1.2 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} From e97304387d26c7d6dab0bba45f5c3426983e44dd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 22 Nov 2018 07:56:54 -0800 Subject: [PATCH 129/178] Update django-extensions from 2.1.3 to 2.1.4 (#1875) --- {{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 f11498272..f325e0ac2 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -25,6 +25,6 @@ coverage==4.5.2 # https://github.com/nedbat/coveragepy 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.3 # https://github.com/django-extensions/django-extensions +django-extensions==2.1.4 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==3.4.4 # https://github.com/pytest-dev/pytest-django From 7d13fb02930e3f9bc54cb583732705aec8b84b1b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 24 Nov 2018 09:32:06 -0800 Subject: [PATCH 130/178] Update pytest from 4.0.0 to 4.0.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b965c06f0..ef436ae0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.6.0 # Testing # ------------------------------------------------------------------------------ tox==3.5.3 -pytest==4.0.0 +pytest==4.0.1 pytest-cookies==0.3.0 From ebaddf63208c8efa21f29af3701a931f9db541c5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 24 Nov 2018 09:32:08 -0800 Subject: [PATCH 131/178] Update pytest from 4.0.0 to 4.0.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 f325e0ac2..99f4557ab 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,7 +12,7 @@ psycopg2-binary==2.7.6.1 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ mypy==0.641 # https://github.com/python/mypy -pytest==4.0.0 # https://github.com/pytest-dev/pytest +pytest==4.0.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar # Code quality From a1508f26009acb07c8a2d5d924ca67c90f1ff882 Mon Sep 17 00:00:00 2001 From: Tubo Shi Date: Fri, 30 Nov 2018 18:12:08 +1300 Subject: [PATCH 132/178] updated spacing utility class name --- .../{{cookiecutter.project_slug}}/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 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 6865c929d..4470e955a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -36,7 +36,7 @@ -
+