From 3a17f9bc271a7fff90c3dccbef86cd839975cf7d Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Fri, 25 May 2018 12:16:04 +0300 Subject: [PATCH 001/117] Remove project doc files likely to remain unused --- {{cookiecutter.project_slug}}/docs/deploy.rst | 4 - .../docs/docker_ec2.rst | 186 ------------------ {{cookiecutter.project_slug}}/docs/index.rst | 14 +- .../docs/install.rst | 4 - 4 files changed, 4 insertions(+), 204 deletions(-) delete mode 100644 {{cookiecutter.project_slug}}/docs/deploy.rst delete mode 100644 {{cookiecutter.project_slug}}/docs/docker_ec2.rst delete mode 100644 {{cookiecutter.project_slug}}/docs/install.rst diff --git a/{{cookiecutter.project_slug}}/docs/deploy.rst b/{{cookiecutter.project_slug}}/docs/deploy.rst deleted file mode 100644 index 1e642c798..000000000 --- a/{{cookiecutter.project_slug}}/docs/deploy.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deploy -======== - -This is where you describe how the project is deployed in production. diff --git a/{{cookiecutter.project_slug}}/docs/docker_ec2.rst b/{{cookiecutter.project_slug}}/docs/docker_ec2.rst deleted file mode 100644 index 606d29563..000000000 --- a/{{cookiecutter.project_slug}}/docs/docker_ec2.rst +++ /dev/null @@ -1,186 +0,0 @@ -Developing with Docker -====================== - -You can develop your application in a `Docker`_ container for simpler deployment onto bare Linux machines later. This instruction assumes an `Amazon Web Services`_ EC2 instance, but it should work on any machine with Docker > 1.3 and `Docker compose`_ installed. - -.. _Docker: https://www.docker.com/ -.. _Amazon Web Services: http://aws.amazon.com/ -.. _Docker compose: https://docs.docker.com/compose/ - -Setting up -^^^^^^^^^^ - -Docker encourages running one container for each process. This might mean one container for your web server, one for Django application and a third for your database. Once you're happy composing containers in this way you can easily add more, such as a `Redis`_ cache. - -.. _Redis: http://redis.io/ - -The Docker compose tool (previously known as `fig`_) makes linking these containers easy. An example set up for your Cookiecutter Django project might look like this: - -.. _fig: http://www.fig.sh/ - -:: - - webapp/ # Your cookiecutter project would be in here - Dockerfile - ... - database/ - Dockerfile - ... - webserver/ - Dockerfile - ... - production.yml - -Each component of your application would get its own `Dockerfile`_. The rest of this example assumes you are using the `base postgres image`_ for your database. Your database settings in `config/base.py` might then look something like: - -.. _Dockerfile: https://docs.docker.com/reference/builder/ -.. _base postgres image: https://registry.hub.docker.com/_/postgres/ - -.. code-block:: python - - DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'postgres', - 'USER': 'postgres', - 'HOST': 'database', - 'PORT': 5432, - } - } - -The `Docker compose documentation`_ explains in detail what you can accomplish in the `production.yml` file, but an example configuration might look like this: - -.. _Docker compose documentation: https://docs.docker.com/compose/#compose-documentation - -.. code-block:: yaml - - database: - build: database - webapp: - build: webapp: - command: /usr/bin/python3.6 manage.py runserver 0.0.0.0:8000 # dev setting - # command: gunicorn -b 0.0.0.0:8000 wsgi:application # production setting - volumes: - - webapp/your_project_name:/path/to/container/workdir/ - links: - - database - webserver: - build: webserver - ports: - - "80:80" - - "443:443" - links: - - webapp - -We'll ignore the webserver for now (you'll want to comment that part out while we do). A working Dockerfile to run your cookiecutter application might look like this: - -:: - - FROM ubuntu:14.04 - ENV REFRESHED_AT 2015-01-13 - - # update packages and prepare to build software - RUN ["apt-get", "update"] - RUN ["apt-get", "-y", "install", "build-essential", "vim", "git", "curl"] - RUN ["locale-gen", "en_GB.UTF-8"] - - # install latest python - RUN ["apt-get", "-y", "build-dep", "python3-dev", "python3-imaging"] - RUN ["apt-get", "-y", "install", "python3-dev", "python3-imaging", "python3-pip"] - - # prepare postgreSQL support - RUN ["apt-get", "-y", "build-dep", "python3-psycopg2"] - - # move into our working directory - # ADD must be after chown see http://stackoverflow.com/a/26145444/1281947 - RUN ["groupadd", "python"] - RUN ["useradd", "python", "-s", "/bin/bash", "-m", "-g", "python", "-G", "python"] - ENV HOME /home/python - WORKDIR /home/python - RUN ["chown", "-R", "python:python", "/home/python"] - ADD ./ /home/python - - # manage requirements - ENV REQUIREMENTS_REFRESHED_AT 2015-02-25 - RUN ["pip3", "install", "-r", "requirements.txt"] - - # uncomment the line below to use container as a non-root user - USER python:python - -Running `sudo docker-compose -f production.yml build` will follow the instructions in your `production.yml` file and build the database container, then your webapp, before mounting your cookiecutter project files as a volume in the webapp container and linking to the database. Our example yaml file runs in development mode but changing it to production mode is as simple as commenting out the line using `runserver` and uncommenting the line using `gunicorn`. - -Both are set to run on port `0.0.0.0:8000`, which is where the Docker daemon will discover it. You can now run `sudo docker-compose -f production.yml up` and browse to `localhost:8000` to see your application running. - -Deployment -^^^^^^^^^^ - -You'll need a webserver container for deployment. An example setup for `Nginx`_ might look like this: - -.. _Nginx: http://wiki.nginx.org/Main - -:: - - FROM ubuntu:14.04 - ENV REFRESHED_AT 2015-02-11 - - # get the nginx package and set it up - RUN ["apt-get", "update"] - RUN ["apt-get", "-y", "install", "nginx"] - - # forward request and error logs to docker log collector - RUN ln -sf /dev/stdout /var/log/nginx/access.log - RUN ln -sf /dev/stderr /var/log/nginx/error.log - VOLUME ["/var/cache/nginx"] - EXPOSE 80 443 - - # load nginx conf - ADD ./site.conf /etc/nginx/sites-available/your_cookiecutter_project - RUN ["ln", "-s", "/etc/nginx/sites-available/your_cookiecutter_project", "/etc/nginx/sites-enabled/your_cookiecutter_project"] - RUN ["rm", "-rf", "/etc/nginx/sites-available/default"] - - #start the server - CMD ["nginx", "-g", "daemon off;"] - -That Dockerfile assumes you have an Nginx conf file named `site.conf` in the same directory as the webserver Dockerfile. A very basic example, which forwards traffic onto the development server or gunicorn for processing, would look like this: - -:: - - # see http://serverfault.com/questions/577370/how-can-i-use-environment-variables-in-nginx-conf#comment730384_577370 - upstream localhost { - server webapp_1:8000; - } - server { - location / { - proxy_pass http://localhost; - } - } - -Running `sudo docker-compose -f production.yml build webserver` will build your server container. Running `sudo docker-compose -f production.yml up` will now expose your application directly on `localhost` (no need to specify the port number). - -Building and running your app on EC2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -All you now need to do to run your app in production is: - -* Create an empty EC2 Linux instance (any Linux machine should do). - -* Install your preferred source control solution, Docker and Docker compose on the news instance. - -* Pull in your code from source control. The root directory should be the one with your `production.yml` file in it. - -* Run `sudo docker-compose -f production.yml build` and `sudo docker-compose -f production.yml up`. - -* Assign an `Elastic IP address`_ to your new machine. - -.. _Elastic IP address: https://aws.amazon.com/articles/1346 - -* Point your domain name to the elastic IP. - -**Be careful with Elastic IPs** because, on the AWS free tier, if you assign one and then stop the machine you will incur charges while the machine is down (presumably because you're preventing them allocating the IP to someone else). - -Security advisory -^^^^^^^^^^^^^^^^^ - -The setup described in this instruction will get you up-and-running but it hasn't been audited for security. If you are running your own setup like this it is always advisable to, at a minimum, examine your application with a tool like `OWASP ZAP`_ to see what security holes you might be leaving open. - -.. _OWASP ZAP: https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project diff --git a/{{cookiecutter.project_slug}}/docs/index.rst b/{{cookiecutter.project_slug}}/docs/index.rst index 21ef98ee5..96752d807 100644 --- a/{{cookiecutter.project_slug}}/docs/index.rst +++ b/{{cookiecutter.project_slug}}/docs/index.rst @@ -3,23 +3,17 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to {{ cookiecutter.project_name }}'s documentation! +{{ cookiecutter.project_name }} Project Documentation ==================================================================== -Contents: +Table of Contents: .. toctree:: :maxdepth: 2 - install - deploy - docker_ec2 - tests - - -Indices and tables -================== +Indices & Tables +================ * :ref:`genindex` * :ref:`modindex` diff --git a/{{cookiecutter.project_slug}}/docs/install.rst b/{{cookiecutter.project_slug}}/docs/install.rst deleted file mode 100644 index 1bc03335d..000000000 --- a/{{cookiecutter.project_slug}}/docs/install.rst +++ /dev/null @@ -1,4 +0,0 @@ -Install -========= - -This is where you write how to get a new laptop to run this project. From 867e2ad629a03a5678dc5bea87fcd06b94099599 Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Thu, 21 Jun 2018 23:11:08 +0300 Subject: [PATCH 002/117] Redis config in local is now conditional on Celery. --- {{cookiecutter.project_slug}}/.envs/.local/.django | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.envs/.local/.django b/{{cookiecutter.project_slug}}/.envs/.local/.django index 8aa9a9946..a145c6bcd 100644 --- a/{{cookiecutter.project_slug}}/.envs/.local/.django +++ b/{{cookiecutter.project_slug}}/.envs/.local/.django @@ -2,6 +2,8 @@ # ------------------------------------------------------------------------------ USE_DOCKER=yes +{%- if cookiecutter.use_celery == 'y' %} # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 +{% endif %} From 6f638078ebe6edcf6b1930658ba2ee4451c94c95 Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Fri, 22 Jun 2018 17:32:10 +0300 Subject: [PATCH 003/117] Moved CELERY_BROKER_URL definition to .django env file to resolve error when Celery is not used (PR #1693) --- {{cookiecutter.project_slug}}/.envs/.production/.django | 7 +++++++ .../compose/production/django/entrypoint.sh | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.django b/{{cookiecutter.project_slug}}/.envs/.production/.django index 2e9eefea7..1203ce648 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.django +++ b/{{cookiecutter.project_slug}}/.envs/.production/.django @@ -43,3 +43,10 @@ DJANGO_SENTRY_DSN= # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 + +{% if cookiecutter.use_celery == "y" %} +# Celery +# ------------------------------------------------------------------------------ +CELERY_BROKER_URL=redis://redis:6379/0 + +{% endif %} \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint.sh b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint.sh index 74242bde4..ae0858e1a 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint.sh +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint.sh @@ -7,9 +7,6 @@ set -o nounset cmd="$@" -# N.B. If only .env files supported variable expansion... -export CELERY_BROKER_URL="${REDIS_URL}" - if [ -z "${POSTGRES_USER}" ]; then base_postgres_image_default_user='postgres' export POSTGRES_USER="${base_postgres_image_default_user}" From 72893b1d0678b9e248e16660e419fbd680b30d4f Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Thu, 21 Jun 2018 23:11:08 +0300 Subject: [PATCH 004/117] Redis config in local is now conditional on Celery. --- {{cookiecutter.project_slug}}/.envs/.local/.django | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.envs/.local/.django b/{{cookiecutter.project_slug}}/.envs/.local/.django index 8aa9a9946..a145c6bcd 100644 --- a/{{cookiecutter.project_slug}}/.envs/.local/.django +++ b/{{cookiecutter.project_slug}}/.envs/.local/.django @@ -2,6 +2,8 @@ # ------------------------------------------------------------------------------ USE_DOCKER=yes +{%- if cookiecutter.use_celery == 'y' %} # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 +{% endif %} From 065becf277d1d56207114aeefbb25f85f62a678d Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Fri, 22 Jun 2018 17:32:10 +0300 Subject: [PATCH 005/117] Moved CELERY_BROKER_URL definition to .django env file to resolve error when Celery is not used (PR #1693) --- {{cookiecutter.project_slug}}/.envs/.production/.django | 7 +++++++ .../compose/production/django/entrypoint | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.django b/{{cookiecutter.project_slug}}/.envs/.production/.django index 5cb90897b..34ab71a28 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.django +++ b/{{cookiecutter.project_slug}}/.envs/.production/.django @@ -43,3 +43,10 @@ SENTRY_DSN= # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 + +{% if cookiecutter.use_celery == "y" %} +# Celery +# ------------------------------------------------------------------------------ +CELERY_BROKER_URL=redis://redis:6379/0 + +{% endif %} \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint index 4845e343b..e2c22de5f 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint @@ -5,9 +5,6 @@ set -o pipefail set -o nounset -# N.B. If only .env files supported variable expansion... -export CELERY_BROKER_URL="${REDIS_URL}" - if [ -z "${POSTGRES_USER}" ]; then base_postgres_image_default_user='postgres' export POSTGRES_USER="${base_postgres_image_default_user}" From c3026e7dfbf94960bc7416bf782dc69285cc0de1 Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Wed, 27 Jun 2018 23:36:06 +0300 Subject: [PATCH 006/117] Added CELERY_BROKER_URL back to entrypoint and surrounded it with a conditional --- .../compose/production/django/entrypoint | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint index e2c22de5f..0a76b3107 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint @@ -5,6 +5,11 @@ set -o pipefail set -o nounset +{% if cookiecutter.use_celery == 'y' %} +# N.B. If only .env files supported variable expansion... +export CELERY_BROKER_URL="${REDIS_URL}" +{% endif %} + if [ -z "${POSTGRES_USER}" ]; then base_postgres_image_default_user='postgres' export POSTGRES_USER="${base_postgres_image_default_user}" From d79f122bc93346ec2f8cbbe5fab6922737060321 Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Thu, 21 Jun 2018 23:11:08 +0300 Subject: [PATCH 007/117] Redis config in local is now conditional on Celery. --- {{cookiecutter.project_slug}}/.envs/.local/.django | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.envs/.local/.django b/{{cookiecutter.project_slug}}/.envs/.local/.django index d94a17e59..6f7a2b11e 100644 --- a/{{cookiecutter.project_slug}}/.envs/.local/.django +++ b/{{cookiecutter.project_slug}}/.envs/.local/.django @@ -2,10 +2,11 @@ # ------------------------------------------------------------------------------ USE_DOCKER=yes +{%- if cookiecutter.use_celery == 'y' %} # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 -{% if cookiecutter.use_celery == 'y' %} + # Celery # ------------------------------------------------------------------------------ From 7c69704f9fe3351be10f976e6eb26f7e98932b33 Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Fri, 22 Jun 2018 17:32:10 +0300 Subject: [PATCH 008/117] Moved CELERY_BROKER_URL definition to .django env file to resolve error when Celery is not used (PR #1693) --- .../compose/production/django/entrypoint | 3 --- 1 file changed, 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint index 4845e343b..e2c22de5f 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint @@ -5,9 +5,6 @@ set -o pipefail set -o nounset -# N.B. If only .env files supported variable expansion... -export CELERY_BROKER_URL="${REDIS_URL}" - if [ -z "${POSTGRES_USER}" ]; then base_postgres_image_default_user='postgres' export POSTGRES_USER="${base_postgres_image_default_user}" From 2c56b2e0e30196b2f89582a640170b3a5fae0145 Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Wed, 27 Jun 2018 23:36:06 +0300 Subject: [PATCH 009/117] Added CELERY_BROKER_URL back to entrypoint and surrounded it with a conditional --- .../compose/production/django/entrypoint | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint index e2c22de5f..0a76b3107 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint @@ -5,6 +5,11 @@ set -o pipefail set -o nounset +{% if cookiecutter.use_celery == 'y' %} +# N.B. If only .env files supported variable expansion... +export CELERY_BROKER_URL="${REDIS_URL}" +{% endif %} + if [ -z "${POSTGRES_USER}" ]; then base_postgres_image_default_user='postgres' export POSTGRES_USER="${base_postgres_image_default_user}" From 9e8e09119d5e7065fd2435b5bfe64fdfd0126816 Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Wed, 10 Oct 2018 21:35:17 -0600 Subject: [PATCH 010/117] 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 011/117] 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 5a4a3217f19c7ac3414a26dc5dab68897c63645e Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Tue, 16 Oct 2018 13:22:04 -0600 Subject: [PATCH 012/117] 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 03e5670c25c8e33cf7f85e94d024d2094af27154 Mon Sep 17 00:00:00 2001 From: HP Bruna Date: Wed, 7 Nov 2018 21:54:52 +0100 Subject: [PATCH 013/117] 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 175381213672b409f940730c2bafc129815d5595 Mon Sep 17 00:00:00 2001 From: Carl Johnson Date: Mon, 12 Nov 2018 15:04:03 -0500 Subject: [PATCH 014/117] 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 015/117] 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 016/117] 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 017/117] 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 018/117] 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 019/117] 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 020/117] 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 021/117] 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 022/117] 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 023/117] 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 024/117] 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 025/117] 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 026/117] 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 027/117] 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 028/117] 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 029/117] 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 030/117] 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 031/117] 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 @@ -
+