From c06586856c69648e92669118c95bec8c4b28e57b Mon Sep 17 00:00:00 2001 From: Michael Herman Date: Wed, 30 Dec 2015 17:40:51 -0700 Subject: [PATCH 001/526] added external resource to readme --- README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.rst b/README.rst index d020aa71..a9b82806 100644 --- a/README.rst +++ b/README.rst @@ -146,6 +146,12 @@ For development, see the following for local development: .. _`Developing locally`: http://cookiecutter-django.readthedocs.org/en/latest/developing-locally.html .. _`Developing locally using docker`: http://cookiecutter-django.readthedocs.org/en/latest/developing-locally-docker.html +For development and deployment: + +* `Development and Deployment of Cookiecutter-Django via Docker`_ + +.. _`Development and Deployment of Cookiecutter-Django via Docker`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-via-docker + Support This Project --------------------------- From bab2c175ad482a0936cce971124364c8f61d89d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bogda=C5=82?= Date: Tue, 5 Jan 2016 19:13:37 +0100 Subject: [PATCH 002/526] Add dockerignore file --- .dockerignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..7f5e005f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.* + From dfcdc5f15bddfeaf798085f17856d462ff7303e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bogda=C5=82?= Date: Tue, 5 Jan 2016 21:35:10 +0100 Subject: [PATCH 003/526] Move file to the appropriate path --- .dockerignore => {{cookiecutter.repo_name}}/.dockerignore | 1 - 1 file changed, 1 deletion(-) rename .dockerignore => {{cookiecutter.repo_name}}/.dockerignore (75%) diff --git a/.dockerignore b/{{cookiecutter.repo_name}}/.dockerignore similarity index 75% rename from .dockerignore rename to {{cookiecutter.repo_name}}/.dockerignore index 7f5e005f..8d98f9de 100644 --- a/.dockerignore +++ b/{{cookiecutter.repo_name}}/.dockerignore @@ -1,2 +1 @@ .* - From 0ea21b470409db681952faa43de9bc77bc82397a Mon Sep 17 00:00:00 2001 From: Michael Herman Date: Thu, 7 Jan 2016 17:17:37 -0700 Subject: [PATCH 004/526] added articles section to readme --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a9b82806..bc9267b0 100644 --- a/README.rst +++ b/README.rst @@ -146,7 +146,8 @@ For development, see the following for local development: .. _`Developing locally`: http://cookiecutter-django.readthedocs.org/en/latest/developing-locally.html .. _`Developing locally using docker`: http://cookiecutter-django.readthedocs.org/en/latest/developing-locally-docker.html -For development and deployment: +Articles +--------- * `Development and Deployment of Cookiecutter-Django via Docker`_ From 8dc86c3390f839d50ff661089a0b3466e8b94c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bogda=C5=82?= Date: Fri, 8 Jan 2016 10:57:57 +0100 Subject: [PATCH 005/526] Add exceptions --- {{cookiecutter.repo_name}}/.dockerignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.repo_name}}/.dockerignore b/{{cookiecutter.repo_name}}/.dockerignore index 8d98f9de..e63c0c18 100644 --- a/{{cookiecutter.repo_name}}/.dockerignore +++ b/{{cookiecutter.repo_name}}/.dockerignore @@ -1 +1,4 @@ .* +!.coveragerc +!.env +!.pylintrc From 76b18588612c1fd02dcebf562c4848b866507875 Mon Sep 17 00:00:00 2001 From: Luis Nell Date: Wed, 13 Jan 2016 21:25:27 +0100 Subject: [PATCH 006/526] Adds celerybeat db to gitignore Doesn't make sense to have the task scheduling db in any VCS. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 0e0a592c..65f19ad2 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,9 @@ my_test_project/* # Generated when running py.test for the cookiecutter-django generation tests .cache/ +# Generated when running celery beat +celerybeat-schedule.db + # Unit test / coverage reports .coverage .tox From 6f0d69446f3698828552dd717baa4943d3d88cab Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Sun, 17 Jan 2016 13:03:01 +0300 Subject: [PATCH 007/526] adding articles section (pr # 456) --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f88a07d..d370b3e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-1-17] +### Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) + + ## [2016-1-16] ### Add explanation for having `django.contrib.sites`. (@pydanny) From 173eb3d102b972da4555ce11b9218c1d36477bd0 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Sun, 17 Jan 2016 13:07:31 +0300 Subject: [PATCH 008/526] fixing style on changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d370b3e2..dc2b1678 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,13 @@ All enhancements and patches to cookiecutter-django will be documented in this f This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-1-17] -### Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) +### Added +- Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) ## [2016-1-16] -### Add explanation for having `django.contrib.sites`. (@pydanny) +### Added +- Adding an explanation for having `django.contrib.sites`. (@pydanny) ## [2016-1-13] From 5756a6173286e8f08e6a00de79e0024f1ffc9017 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Mon, 18 Jan 2016 00:00:03 -0800 Subject: [PATCH 009/526] Add #469 by @originell to changelog/contributors. --- CHANGELOG.md | 3 ++- CONTRIBUTORS.rst | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc2b1678..938f26ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-1-17] ### Added - Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) - +### Changed +- Add celerybeat db to gitignore (@originell) ## [2016-1-16] ### Added diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 0c4e8575..93cff012 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -77,6 +77,7 @@ Listed in alphabetical order. Kevin A. Stone Kevin Ndung'u `@kevgathuku`_ Lin Xianyi `@iynaix`_ + Luis Nell `@originell`_ Lukas Klein Lyla Fischer Martin Blech @@ -143,6 +144,7 @@ Listed in alphabetical order. .. _@jvanbrug: https://github.com/jvanbrug .. _@ddiazpinto: https://github.com/ddiazpinto .. _@Collederas: https://github.com/Collederas +.. _@originell: https://github.com/originell Special Thanks ~~~~~~~~~~~~~~ From bd8d23fac354428d1cd4b9548c24fbbaae48195c Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Mon, 18 Jan 2016 12:14:34 +0100 Subject: [PATCH 010/526] remove $ from allowed chars django-environ has problems with environment variables that begin with a `$` sign, see https://github.com/joke2k/django-environ/issues/60 --- 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 9570e9f4..107d6f98 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -33,7 +33,7 @@ except NotImplementedError: def get_random_string( length=50, - allowed_chars='abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'): + allowed_chars='abcdefghijklmnopqrstuvwxyz0123456789!@#%^&*(-_=+)'): """ Returns a securely generated random string. The default length of 12 with the a-z, A-Z, 0-9 character set returns From 82a30ea88c2f4727824a243d0d4c6af04fe5741e Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 18 Jan 2016 11:56:48 +0100 Subject: [PATCH 011/526] adds simple docker test --- .travis.yml | 10 ++++++++-- tests/test_docker.sh | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/test_docker.sh diff --git a/.travis.yml b/.travis.yml index 4608b31c..701bc097 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,10 @@ # Config file for automatic testing at travis-ci.org -sudo: false +sudo: required + +services: + - docker + language: python python: 3.5 env: @@ -8,7 +12,9 @@ env: - TOX_ENV=py34 - TOX_ENV=py35 -script: tox -e $TOX_ENV +script: + - tox -e $TOX_ENV + - sh tests/test_docker.sh install: - pip install tox diff --git a/tests/test_docker.sh b/tests/test_docker.sh new file mode 100644 index 00000000..30a27dad --- /dev/null +++ b/tests/test_docker.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# this is a very simple script that tests the docker configuration for cookiecutter-django +# it is meant to be run from the root directory of the repository, eg: +# sh tests/test_docker.sh + +# install test requirements +pip install -r requirements.txt + +# create a cache directory +mkdir -p .cache/docker +cd .cache/docker + +# create the project using the default settings in cookiecutter.json +cookiecutter ../../ --no-input --overwrite-if-exists +cd project_name + +# run the project's tests +docker-compose -f dev.yml run django python manage.py test From 715fbee022f8763e56ad30bdb262cad8ccbcb1f0 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Mon, 18 Jan 2016 12:45:56 +0100 Subject: [PATCH 012/526] added $-sign remove --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 938f26ad..5cebb719 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-1-17] +### Changed +- Removed the $-sign from allowed chars to generate the secret key (@jayfk) + ## [2016-1-17] ### Added - Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) From 0fa6eb6cdea0b7080f7291692b7bdc846317bd5d Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Mon, 18 Jan 2016 12:48:49 +0100 Subject: [PATCH 013/526] added .dockerignore file --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cebb719..e8b74fdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All enhancements and patches to cookiecutter-django will be documented in this f This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-1-17] +### Added +- Added .dockerignore file (@bogdal) + ### Changed - Removed the $-sign from allowed chars to generate the secret key (@jayfk) From f9fd29e8981c041fb29c240bc8c285634ce77269 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Mon, 18 Jan 2016 12:50:01 +0100 Subject: [PATCH 014/526] reformatting --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8b74fdd..533f3100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [2016-1-17] +## [2016-1-18] ### Added - Added .dockerignore file (@bogdal) @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-1-17] ### Added - Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) + ### Changed - Add celerybeat db to gitignore (@originell) @@ -41,6 +42,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-1-6] ### Added - You can now enable or disable user registration using the ACCOUNT_ALLOW_REGISTRATION setting. (@ddiazpinto) + ### Changed - Use Postgres 9.5 on docker (@jayfk) From 96e0b0774d9e7e254d5b8b11615678a1dcc6d15f Mon Sep 17 00:00:00 2001 From: Michael Herman Date: Mon, 18 Jan 2016 08:38:22 -0700 Subject: [PATCH 015/526] added new article --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index bc9267b0..d7d7dbac 100644 --- a/README.rst +++ b/README.rst @@ -150,8 +150,10 @@ Articles --------- * `Development and Deployment of Cookiecutter-Django via Docker`_ +* `Development and Deployment of Cookiecutter-Django on Fedora`_ .. _`Development and Deployment of Cookiecutter-Django via Docker`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-via-docker +.. _`Development and Deployment of Cookiecutter-Django on Fedora`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-on-fedora/ Support This Project --------------------------- From 1722d461b320428e8786dfdb4fa8cb0b706091f9 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 18 Jan 2016 19:31:56 -0800 Subject: [PATCH 016/526] Changelog commit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 533f3100..52c021ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-1-18] ### Added - Added .dockerignore file (@bogdal) +- Docker tests for travis (@jayfk) ### Changed - Removed the $-sign from allowed chars to generate the secret key (@jayfk) From 9a2f72773a851f37c418ba23470106b4ccb31250 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 26 Jan 2016 17:04:59 +0100 Subject: [PATCH 017/526] fixed new relic app name The app name wasn't displayed correctly on the new relic dashboard. Although `NEW_RELIC_APP_NAME` was set in `production.py`, the variable was not loaded *before* the newrelic agent was called. Since the new relic agent is loaded at a very low level, NEW_RELIC_APP_NAME has to be set before django settings are imported. --- CHANGELOG.md | 4 ++++ docs/settings.rst | 3 ++- {{cookiecutter.repo_name}}/config/settings/production.py | 2 +- {{cookiecutter.repo_name}}/env.example | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52c021ea..0819ae7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-1-26] +### Changed +- Fixed NEW_RELIC_APP_NAME environment variable (@jayfk) + ## [2016-1-18] ### Added - Added .dockerignore file (@bogdal) diff --git a/docs/settings.rst b/docs/settings.rst index aec7c513..c253c18c 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -40,6 +40,7 @@ DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error DJANGO_MAILGUN_SERVER_NAME MAILGUN_SERVER_NAME 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 DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a raises error DJANGO_OPBEAT_SECRET_TOKEN OPBEAT['SECRET_TOKEN'] n/a raises error @@ -51,4 +52,4 @@ Other Settings -------------- ACCOUNT_ALLOW_REGISTRATION (=True) - Allow enable or disable user registration through `django-allauth` without disabling other characteristics like authentication and account management. \ No newline at end of file + Allow enable or disable user registration through `django-allauth` without disabling other characteristics like authentication and account management. diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index 09b7ba37..abf5fc99 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -147,7 +147,7 @@ EMAIL_SUBJECT_PREFIX = env("DJANGO_EMAIL_SUBJECT_PREFIX", default='[{{cookiecutt SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL) {% if cookiecutter.use_newrelic == 'y'-%} NEW_RELIC_LICENSE_KEY = env('NEW_RELIC_LICENSE_KEY') -NEW_RELIC_APP_NAME = '{{cookiecutter.project_name}}' +NEW_RELIC_APP_NAME = env('NEW_RELIC_APP_NAME') {%- endif %} # TEMPLATE CONFIGURATION diff --git a/{{cookiecutter.repo_name}}/env.example b/{{cookiecutter.repo_name}}/env.example index 749deaed..7eae951c 100644 --- a/{{cookiecutter.repo_name}}/env.example +++ b/{{cookiecutter.repo_name}}/env.example @@ -16,7 +16,8 @@ DJANGO_SECURE_SSL_REDIRECT=False DJANGO_SENTRY_DSN= {% endif %} {% if cookiecutter.use_newrelic == 'y' -%} -NEW_RELIC_LICENSE_KEY +NEW_RELIC_LICENSE_KEY= +NEW_RELIC_APP_NAME={{cookiecutter.repo_name}} {% endif %} {% if cookiecutter.use_opbeat == 'y' -%} DJANGO_OPBEAT_ORGANIZATION_ID From 8b82f2a80444a3f05ab7a731ed5ef1f32d747d6c Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 29 Jan 2016 02:42:45 -0300 Subject: [PATCH 018/526] update version of dependencies --- CHANGELOG.md | 10 ++++++ cookiecutter.json | 2 +- requirements.txt | 8 ++--- .../requirements/base.txt | 2 +- .../requirements/local.txt | 4 +-- .../requirements/production.txt | 8 ++--- .../requirements/test.txt | 4 +-- .../tests/hitchreqs.txt | 36 +++++++++---------- .../templates/base.html | 4 +-- 9 files changed, 44 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0819ae7d..000036ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + +## [2016-1-29] +### Changed +- Update AngularJS version to 1.4.9 (@luzfcb) +- Update jQuery version to 2.2.0 (@luzfcb) +- Update 'now' date in cookiecutter.json (@luzfcb) +- Update version of boto, celery, django_coverage_plugin, django-storages-redux, flake8, gevent, gunicorn, pep8, pytest, tox, Werkzeug (@luzfcb) +- Update version of Hitch tests dependencies: colorama, decorator, hitchpostgres, hitchpython, hitchredis, hitchselenium, hitchserve, hitchsystem, hitchtest, ipython, patool, pickleshare, psutil, python-build, requests, selenium, tblib, traitlets (@luzfcb) + + ## [2016-1-26] ### Changed - Fixed NEW_RELIC_APP_NAME environment variable (@jayfk) diff --git a/cookiecutter.json b/cookiecutter.json index 925a7550..a9b01f9d 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -7,7 +7,7 @@ "domain_name": "example.com", "version": "0.1.0", "timezone": "UTC", - "now": "2016/01/07", + "now": "2016/01/29", "year": "{{ cookiecutter.now[:4] }}", "use_whitenoise": "y", "use_celery": "n", diff --git a/requirements.txt b/requirements.txt index a1f3fae8..04e7741f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ cookiecutter==1.3.0 -flake8==2.5.0 +flake8==2.5.1 sh==1.11 binaryornot==0.4.0 # Testing -pytest==2.8.3 -pep8==1.6.2 +pytest==2.8.7 +pep8==1.7.0 pyflakes==1.0.0 -tox==2.2.1 +tox==2.3.1 diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 3f0c1159..18ce90cc 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -52,7 +52,7 @@ django-redis==4.3.0 redis>=2.10.0 {% if cookiecutter.use_celery == "y" %} -celery==3.1.19 +celery==3.1.20 {% endif %} # Your custom requirements go here diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 9ee0b1b3..26c0804e 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -1,10 +1,10 @@ # Local development dependencies go here -r base.txt coverage==4.0.3 -django_coverage_plugin==1.1 +django_coverage_plugin==1.2.1 Sphinx django-extensions==1.6.1 -Werkzeug==0.11.2 +Werkzeug==0.11.3 django-test-plus==1.0.11 factory_boy==2.6.0 diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index fedfa481..1ef2e9bf 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -15,14 +15,14 @@ psycopg2==2.6.1 gevent==1.0.2 {% else %} # there's no python 3 support in stable, have to use the latest release candidate for gevent -gevent==1.1rc1 +gevent==1.1rc3 {% endif %} -gunicorn==19.4.1 +gunicorn==19.4.5 # Static and Media Storage # ------------------------------------------------ -boto==2.38.0 -django-storages-redux==1.3 +boto==2.39.0 +django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.2.3 {%- endif %} diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index 384ff900..1a276a97 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -8,7 +8,7 @@ psycopg2==2.6.1 {%- endif %} coverage==4.0.3 -django_coverage_plugin==1.1 -flake8==2.5.0 +django_coverage_plugin==1.2.1 +flake8==2.5.1 django-test-plus==1.0.11 factory_boy==2.6.0 diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 4b9cd683..29353452 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -1,39 +1,39 @@ click==6.2 -colorama==0.3.3 -decorator==4.0.4 +colorama==0.3.6 +decorator==4.0.6 docopt==0.6.2 faketime==0.9.6.3 hitchcron==0.2 -hitchpostgres==0.6.7 -hitchpython==0.5.0 -hitchredis==0.4.5 -hitchselenium==0.4.8 -hitchserve==0.4.6 +hitchpostgres==0.7.0 +hitchpython==0.5.2 +hitchredis==0.4.6 +hitchselenium==0.5.0 +hitchserve==0.4.8 hitchsmtp==0.2.1 -hitchsystem==0.1.1 -hitchtest==0.9.2 +hitchsystem==0.1.2 +hitchtest==0.9.6 humanize==0.5.1 -ipython==4.0.1 +ipython==4.0.3 ipython-genutils==0.1.0 Jinja2==2.8 MarkupSafe==0.23 path.py==8.1.2 -patool==1.8 +patool==1.12 pexpect==4.0.1 -pickleshare==0.5 -psutil==3.3.0 +pickleshare==0.6 +psutil==3.4.2 ptyprocess==0.5 pykwalify==1.5.0 -python-build==0.2.6 +python-build==0.2.12 python-dateutil==2.4.2 pyuv==1.2.0 PyYAML==3.11 -requests==2.8.1 -selenium==2.48.0 +requests==2.9.1 +selenium==2.50.0 simplegeneric==0.8.1 six==1.10.0 -tblib==1.1.0 +tblib==1.2.0 tornado==4.3 -traitlets==4.0.0 +traitlets==4.1.0 unixpackage==0.4.0 xeger==0.3 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index bb1a07de..75fec9fa 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -24,7 +24,7 @@ {% endblock %} {% block angular %} - + {% endblock %} @@ -93,7 +93,7 @@ {% block javascript %} - + From 5c9b01ae8747e76bace098bdd34454c6c729e473 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Sat, 30 Jan 2016 17:32:01 -0300 Subject: [PATCH 019/526] update flake8 version --- CHANGELOG.md | 3 +++ requirements.txt | 2 +- {{cookiecutter.repo_name}}/requirements/test.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 000036ee..2a5f108e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-1-30] +### Changed +- Update flake8 to 2.5.2 (@luzfcb) ## [2016-1-29] ### Changed diff --git a/requirements.txt b/requirements.txt index 04e7741f..d1f67aaf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cookiecutter==1.3.0 -flake8==2.5.1 +flake8==2.5.2 sh==1.11 binaryornot==0.4.0 diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index 1a276a97..56b31ce0 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -9,6 +9,6 @@ psycopg2==2.6.1 coverage==4.0.3 django_coverage_plugin==1.2.1 -flake8==2.5.1 +flake8==2.5.2 django-test-plus==1.0.11 factory_boy==2.6.0 From 7779c726a07088b56dfabca12579dbd1bb4ea77f Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Mon, 1 Feb 2016 18:10:14 -0300 Subject: [PATCH 020/526] update django, django-floppyforms, hitchpython and selenium version --- CHANGELOG.md | 25 +++++++++++-------- setup.py | 2 +- .../requirements/base.txt | 4 +-- .../tests/hitchreqs.txt | 4 +-- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a5f108e..9ca2ce9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,16 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [2016-1-30] +## [2016-02-01] +### Changed +- Update version of Django and django-floppyforms (@luzfcb) +- Update version of Hitch tests dependencies: hitchpython and selenium (@luzfcb) + +## [2016-01-30] ### Changed - Update flake8 to 2.5.2 (@luzfcb) -## [2016-1-29] +## [2016-01-29] ### Changed - Update AngularJS version to 1.4.9 (@luzfcb) - Update jQuery version to 2.2.0 (@luzfcb) @@ -15,7 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Update version of Hitch tests dependencies: colorama, decorator, hitchpostgres, hitchpython, hitchredis, hitchselenium, hitchserve, hitchsystem, hitchtest, ipython, patool, pickleshare, psutil, python-build, requests, selenium, tblib, traitlets (@luzfcb) -## [2016-1-26] +## [2016-01-26] ### Changed - Fixed NEW_RELIC_APP_NAME environment variable (@jayfk) @@ -27,24 +32,24 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Removed the $-sign from allowed chars to generate the secret key (@jayfk) -## [2016-1-17] +## [2016-01-17] ### Added - Adding a section on third party articles referencing `cookiecutter-django` (@mjheo) ### Changed - Add celerybeat db to gitignore (@originell) -## [2016-1-16] +## [2016-01-16] ### Added - Adding an explanation for having `django.contrib.sites`. (@pydanny) -## [2016-1-13] +## [2016-01-13] ### Changed - Update setup.py version to 1.9.1 to match Django version. (@Collederas) - Require Wheel 0.26.0. Needed to install certain packages on CPython 3.5+ like Pillow and psycopg2 (@audreyr) -## [2016-1-9] +## [2016-01-09] ### Changed - Upgraded django-extensions to 1.6.1 as it fixes a [JSONField bug](https://github.com/django-extensions/django-extensions/blob/master/CHANGELOG.md#161) (@burhan) - Upgraded Pillow to version 3.1.0 ([upstream changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst#310-2016-01-04)) (@burhan) @@ -52,19 +57,19 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Upgraded django-crispy-forms to 1.6 for [BS4 and django 1.9 compatibility fixes](https://github.com/maraujop/django-crispy-forms/blob/dev/CHANGELOG.md#160-201617) (@burhan) - Upgraded django-model-utils to 2.4, to enable [support for django 1.9](https://github.com/carljm/django-model-utils/blob/master/CHANGES.rst#24-2015-12-03) (@burhan) -## [2016-1-8] +## [2016-01-08] ### Changed - Fixed redis url on docker (@jayfk) - Fixed docker on windows (@burhan) -## [2016-1-6] +## [2016-01-06] ### Added - You can now enable or disable user registration using the ACCOUNT_ALLOW_REGISTRATION setting. (@ddiazpinto) ### Changed - Use Postgres 9.5 on docker (@jayfk) -## [2016-1-4] +## [2016-01-04] ### Added - Add Tether.js because [is needed](http://v4-alpha.getbootstrap.com/components/tooltips/#overview) for proper positioning of Bootstrap tooltips (@EricZaporzan) diff --git a/setup.py b/setup.py index 29c20e2d..152c6f82 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = "1.9.1" +version = "1.9.2" if sys.argv[-1] == 'tag': os.system("git tag -a %s -m 'version %s'" % (version, version)) diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 18ce90cc..7e54c726 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.26.0 {%- endif %} # Bleeding edge Django -django==1.9.1 +django==1.9.2 # Configuration django-environ==0.4.0 @@ -20,7 +20,7 @@ whitenoise==2.0.6 # Forms django-braces==1.8.1 django-crispy-forms==1.6.0 -django-floppyforms==1.6.0 +django-floppyforms==1.6.1 # Models django-model-utils==2.4 diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 29353452..a52c8540 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -5,7 +5,7 @@ docopt==0.6.2 faketime==0.9.6.3 hitchcron==0.2 hitchpostgres==0.7.0 -hitchpython==0.5.2 +hitchpython==0.5.3 hitchredis==0.4.6 hitchselenium==0.5.0 hitchserve==0.4.8 @@ -29,7 +29,7 @@ python-dateutil==2.4.2 pyuv==1.2.0 PyYAML==3.11 requests==2.9.1 -selenium==2.50.0 +selenium==2.50.1 simplegeneric==0.8.1 six==1.10.0 tblib==1.2.0 From 9f08e59d166315625bd1608413ab79a394eff570 Mon Sep 17 00:00:00 2001 From: yunti Date: Thu, 4 Feb 2016 18:41:03 +0000 Subject: [PATCH 021/526] Changed LoginRequiredMixin import Mixin now part of djanog core from 1.9 --- .../{{cookiecutter.repo_name}}/users/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/views.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/views.py index f1b523b3..294033c5 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/views.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/views.py @@ -4,7 +4,7 @@ from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView -from braces.views import LoginRequiredMixin +from django.contrib.auth.mixins import LoginRequiredMixin from .models import User From f44b9fad418b0a49497c7f6b3fbadcc497fb853f Mon Sep 17 00:00:00 2001 From: Colm O'Connor Date: Sat, 6 Feb 2016 16:29:10 +0000 Subject: [PATCH 022/526] Fix for issue #389 (and related issues). For when different distributions have different package names (e.g. libtiff5-dev for ubuntu wily and libtiff4-dev for ubuntu trusty). Ensures that the correct one is installed for the distribution the user is on. --- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 2 +- {{cookiecutter.repo_name}}/tests/system.packages | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index a52c8540..7da9941d 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -35,5 +35,5 @@ six==1.10.0 tblib==1.2.0 tornado==4.3 traitlets==4.1.0 -unixpackage==0.4.0 +unixpackage==0.4.1 xeger==0.3 diff --git a/{{cookiecutter.repo_name}}/tests/system.packages b/{{cookiecutter.repo_name}}/tests/system.packages index 0442c09d..cd0c0688 100644 --- a/{{cookiecutter.repo_name}}/tests/system.packages +++ b/{{cookiecutter.repo_name}}/tests/system.packages @@ -2,10 +2,10 @@ firefox libpq-dev llvm graphviz-dev -libtiff4-dev +libtiff-dev libjpeg8-dev libfreetype6-dev -liblcms1-dev +liblcms-dev libwebp-dev zlib1g-dev gettext From b5f82d41f2e38561d05c5b019bf8b6743fdd0467 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Sun, 7 Feb 2016 02:26:40 -0300 Subject: [PATCH 023/526] update requirements and CHANGELOG --- CHANGELOG.md | 8 ++++++++ {{cookiecutter.repo_name}}/requirements/base.txt | 4 ++-- {{cookiecutter.repo_name}}/requirements/local.txt | 2 +- {{cookiecutter.repo_name}}/requirements/test.txt | 2 +- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 10 +++++----- .../{{cookiecutter.repo_name}}/templates/base.html | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca2ce9d..6c90d4f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-02-07] +### Changed +- In `users` app, use Django 1.9 `LoginRequiredMixin` instead of django-braces implementation (@yunti) +- Update native OS libraries of Hitch Test, because [unixpackage](https://github.com/unixpackage/unixpackage) now supports multiple versions of same Linux distribution (@crdoconnor) +- Update AngularJS version to 1.5.0 (@luzfcb) +- Update version of wheel, Pillow, django_coverage_plugin (@luzfcb) +- Update version of Hitch tests dependencies: decorator, hitchselenium, ipython, ptyprocess, selenium (@luzfcb) + ## [2016-02-01] ### Changed - Update version of Django and django-floppyforms (@luzfcb) diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 7e54c726..8c40dd5d 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -3,7 +3,7 @@ # like Pillow and psycopg2 # See http://bitly.com/wheel-building-fails-CPython-35 # Verified bug on Python 3.5.1 -wheel==0.26.0 +wheel==0.29.0 {%- endif %} # Bleeding edge Django @@ -26,7 +26,7 @@ django-floppyforms==1.6.1 django-model-utils==2.4 # Images -Pillow==3.1.0 +Pillow==3.1.1 # For user registration, either via email or social # Well-built with regular release cycles! diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 26c0804e..3253fdff 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -1,7 +1,7 @@ # Local development dependencies go here -r base.txt coverage==4.0.3 -django_coverage_plugin==1.2.1 +django_coverage_plugin==1.2.2 Sphinx django-extensions==1.6.1 Werkzeug==0.11.3 diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index 56b31ce0..948a040b 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -8,7 +8,7 @@ psycopg2==2.6.1 {%- endif %} coverage==4.0.3 -django_coverage_plugin==1.2.1 +django_coverage_plugin==1.2.2 flake8==2.5.2 django-test-plus==1.0.11 factory_boy==2.6.0 diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 7da9941d..219304fa 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -1,19 +1,19 @@ click==6.2 colorama==0.3.6 -decorator==4.0.6 +decorator==4.0.7 docopt==0.6.2 faketime==0.9.6.3 hitchcron==0.2 hitchpostgres==0.7.0 hitchpython==0.5.3 hitchredis==0.4.6 -hitchselenium==0.5.0 +hitchselenium==0.5.1 hitchserve==0.4.8 hitchsmtp==0.2.1 hitchsystem==0.1.2 hitchtest==0.9.6 humanize==0.5.1 -ipython==4.0.3 +ipython==4.1.1 ipython-genutils==0.1.0 Jinja2==2.8 MarkupSafe==0.23 @@ -22,14 +22,14 @@ patool==1.12 pexpect==4.0.1 pickleshare==0.6 psutil==3.4.2 -ptyprocess==0.5 +ptyprocess==0.5.1 pykwalify==1.5.0 python-build==0.2.12 python-dateutil==2.4.2 pyuv==1.2.0 PyYAML==3.11 requests==2.9.1 -selenium==2.50.1 +selenium==2.51.1 simplegeneric==0.8.1 six==1.10.0 tblib==1.2.0 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index 75fec9fa..8113478c 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -24,7 +24,7 @@ {% endblock %} {% block angular %} - + {% endblock %} From e0a1bf8f8c68aaa84901c57c641307d8361727c8 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sun, 7 Feb 2016 20:56:28 -0800 Subject: [PATCH 024/526] Fixes #184, allows for license choices --- cookiecutter.json | 3 ++- {{cookiecutter.repo_name}}/LICENSE | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index a9b01f9d..b70c4bba 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -16,5 +16,6 @@ "use_newrelic": "n", "use_opbeat": "n", "windows": "n", - "use_python2": "n" + "use_python2": "n", + "open_source_license": ["MIT", "BSD", "Not open source"] } diff --git a/{{cookiecutter.repo_name}}/LICENSE b/{{cookiecutter.repo_name}}/LICENSE index 2564db27..0380bee5 100644 --- a/{{cookiecutter.repo_name}}/LICENSE +++ b/{{cookiecutter.repo_name}}/LICENSE @@ -1,3 +1,13 @@ +{% if cookiecutter.open_source_license == 'MIT' %} +The MIT License (MIT) +Copyright (c) {{ cookiecutter.year }}, {{ cookiecutter.author_name }} + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +{% elif cookiecutter.license == 'BSD' %} Copyright (c) {{ cookiecutter.year }}, {{ cookiecutter.author_name }} All rights reserved. @@ -25,3 +35,4 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +{% endif %} \ No newline at end of file From f35412248bdae9a1257b6cd201b6f61e0cae1fd6 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 8 Feb 2016 09:29:26 -0800 Subject: [PATCH 025/526] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c90d4f3..4aca0a90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Update AngularJS version to 1.5.0 (@luzfcb) - Update version of wheel, Pillow, django_coverage_plugin (@luzfcb) - Update version of Hitch tests dependencies: decorator, hitchselenium, ipython, ptyprocess, selenium (@luzfcb) +- Provided options for FOSS license choices, or for private efforts, no written license (@pydanny) ## [2016-02-01] ### Changed From d6962a890dc62adbd3f848bbc19fea4c3848d96d Mon Sep 17 00:00:00 2001 From: yunti Date: Tue, 9 Feb 2016 18:36:56 +0000 Subject: [PATCH 026/526] Fixed typo on 403 exception --- {{cookiecutter.repo_name}}/config/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/config/urls.py b/{{cookiecutter.repo_name}}/config/urls.py index b63a9731..7d394947 100644 --- a/{{cookiecutter.repo_name}}/config/urls.py +++ b/{{cookiecutter.repo_name}}/config/urls.py @@ -29,7 +29,7 @@ if settings.DEBUG: # these url in browser to see how these error pages look like. urlpatterns += [ url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception("Bad Request!")}), - url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception("Permissin Denied")}), + url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception("Permission Denied")}), url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception("Page not Found")}), url(r'^500/$', default_views.server_error), ] From 0d342210afc01f1f5e1bc732201a429ebf0a9a5d Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Fri, 12 Feb 2016 19:27:52 +0100 Subject: [PATCH 027/526] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aca0a90..7d17f129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-02-12] +### Changed +- Fixed typo (@yunti) + ## [2016-02-07] ### Changed - In `users` app, use Django 1.9 `LoginRequiredMixin` instead of django-braces implementation (@yunti) From c917ab50574b9d735f3dd8621759f581b194f0d9 Mon Sep 17 00:00:00 2001 From: Colm O'Connor Date: Mon, 15 Feb 2016 22:40:30 +0000 Subject: [PATCH 028/526] Upgraded hitchreqs.txt (decorator version specified was taken down off pypi) --- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 219304fa..9428b3a3 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -1,6 +1,7 @@ +backports-abc==0.4 click==6.2 colorama==0.3.6 -decorator==4.0.7 +decorator==4.0.9 docopt==0.6.2 faketime==0.9.6.3 hitchcron==0.2 @@ -16,6 +17,8 @@ humanize==0.5.1 ipython==4.1.1 ipython-genutils==0.1.0 Jinja2==2.8 +jupyter-client==4.1.1 +jupyter-core==4.0.6 MarkupSafe==0.23 path.py==8.1.2 patool==1.12 @@ -24,12 +27,13 @@ pickleshare==0.6 psutil==3.4.2 ptyprocess==0.5.1 pykwalify==1.5.0 -python-build==0.2.12 +python-build==0.2.13 python-dateutil==2.4.2 pyuv==1.2.0 PyYAML==3.11 +pyzmq==15.2.0 requests==2.9.1 -selenium==2.51.1 +selenium==2.52.0 simplegeneric==0.8.1 six==1.10.0 tblib==1.2.0 From a5e127b9a1eddda1910846beaa572134fcf40d36 Mon Sep 17 00:00:00 2001 From: Colm O'Connor Date: Mon, 15 Feb 2016 22:45:43 +0000 Subject: [PATCH 029/526] Shrink window size when running selenium tests to something smaller and easier to view. --- {{cookiecutter.repo_name}}/tests/all.settings | 2 +- {{cookiecutter.repo_name}}/tests/engine.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/tests/all.settings b/{{cookiecutter.repo_name}}/tests/all.settings index 0dcdb77c..0c396560 100644 --- a/{{cookiecutter.repo_name}}/tests/all.settings +++ b/{{cookiecutter.repo_name}}/tests/all.settings @@ -13,7 +13,7 @@ environment_variables: DJANGO_EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend window_size: width: 1024 - height: 768 + height: 600 python_version: {% if cookiecutter.use_python2 == 'n' %}3.5.0{% else %}2.7.10{% endif %} environment: - approved_platforms: diff --git a/{{cookiecutter.repo_name}}/tests/engine.py b/{{cookiecutter.repo_name}}/tests/engine.py index 6b7b63b9..d9efd602 100644 --- a/{{cookiecutter.repo_name}}/tests/engine.py +++ b/{{cookiecutter.repo_name}}/tests/engine.py @@ -102,7 +102,7 @@ class ExecutionEngine(hitchtest.ExecutionEngine): self.click_and_dont_wait_for_page_load = self.webapp.click_and_dont_wait_for_page_load # Configure selenium driver - self.driver.set_window_size(self.settings['window_size']['height'], self.settings['window_size']['width']) + self.driver.set_window_size(self.settings['window_size']['width'], self.settings['window_size']['height']) self.driver.set_window_position(0, 0) self.driver.implicitly_wait(2.0) self.driver.accept_next_alert = True From 4490d08659e8066c2e58e1c01e70dddf72302ab1 Mon Sep 17 00:00:00 2001 From: Colm O'Connor Date: Mon, 15 Feb 2016 22:46:07 +0000 Subject: [PATCH 030/526] Remove click: djHideToolBarButton step and put it in load_website. --- {{cookiecutter.repo_name}}/tests/engine.py | 1 + {{cookiecutter.repo_name}}/tests/register-and-log-in.test | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/tests/engine.py b/{{cookiecutter.repo_name}}/tests/engine.py index d9efd602..fa6b2b65 100644 --- a/{{cookiecutter.repo_name}}/tests/engine.py +++ b/{{cookiecutter.repo_name}}/tests/engine.py @@ -118,6 +118,7 @@ class ExecutionEngine(hitchtest.ExecutionEngine): def load_website(self): """Navigate to website in Firefox.""" self.driver.get(self.services['Django'].url()) + self.click("djHideToolBarButton") def fill_form(self, **kwargs): """Fill in a form with id=value.""" diff --git a/{{cookiecutter.repo_name}}/tests/register-and-log-in.test b/{{cookiecutter.repo_name}}/tests/register-and-log-in.test index 14655dcd..971c9a6b 100644 --- a/{{cookiecutter.repo_name}}/tests/register-and-log-in.test +++ b/{{cookiecutter.repo_name}}/tests/register-and-log-in.test @@ -1,7 +1,6 @@ - name: Sign up and log in scenario: - Load website - - Click: djHideToolBarButton - Click: sign-up-link - Fill form: id_username: testuser From 47c3fa749b71d826595c84965c42e8c0b220e38a Mon Sep 17 00:00:00 2001 From: Colm O'Connor Date: Mon, 15 Feb 2016 22:54:02 +0000 Subject: [PATCH 031/526] Make hitch tests pause on success in TDD mode. --- {{cookiecutter.repo_name}}/tests/tdd.settings | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.repo_name}}/tests/tdd.settings b/{{cookiecutter.repo_name}}/tests/tdd.settings index 08e1df71..0d88eded 100644 --- a/{{cookiecutter.repo_name}}/tests/tdd.settings +++ b/{{cookiecutter.repo_name}}/tests/tdd.settings @@ -6,3 +6,4 @@ failfast: true pause_on_failure: true +pause_on_success: true \ No newline at end of file From 25b0544c2f2c78dbc3bf971d955fda651d7ed5e9 Mon Sep 17 00:00:00 2001 From: blueness Date: Tue, 16 Feb 2016 09:23:57 +0800 Subject: [PATCH 032/526] fix is_open_for_signup missing param add a missing param to SocialAccountAdapter.is_open_for_signup --- .../{{cookiecutter.repo_name}}/users/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py index 1d4dda1c..ce8a159d 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py @@ -10,5 +10,5 @@ class AccountAdapter(DefaultAccountAdapter): class SocialAccountAdapter(DefaultSocialAccountAdapter): - def is_open_for_signup(self, request): + def is_open_for_signup(self, request, sociallogin): return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True) From 6cd4ab6e81bbb45130312de2d91087999e155763 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Mon, 15 Feb 2016 22:50:40 -0300 Subject: [PATCH 033/526] update changelog --- CHANGELOG.md | 6 ++++++ CONTRIBUTORS.rst | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d17f129..63066d8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-02-15] +### Changed +- In `users` app adapter, fix `is_open_for_signup` missing parameter (@oryx2) +- Fixes and improvements in Hitch tests , see [#485](https://github.com/pydanny/cookiecutter-django/pull/485) (@crdoconnor) + + ## [2016-02-12] ### Changed - Fixed typo (@yunti) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 93cff012..5a5b1f23 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -12,7 +12,7 @@ Name Github Twitter =========================== ============= =========== Daniel Roy Greenfeld `@pydanny`_ @pydanny Audrey Roy Greenfeld* `@audreyr`_ @audreyr -Fábio C. Barrionuevo da Luz `@luzfcb`_ +Fábio C. Barrionuevo da Luz `@luzfcb`_ @luzfcb Saurabh Kumar `@theskumar`_ @_theskumar Jannis Gebauer `@jayfk`_ Burhan Khalid `@burhan`_ @burhan From 1c82d593811982942e91ac61e70cb37bcf114c17 Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Tue, 16 Feb 2016 18:02:29 +0100 Subject: [PATCH 034/526] Renamed the file adapter.py to adapters.py The rename took place to be consistent with the default django style ('view*s*.py', 'manager*s*.py', etc). --- .../{{cookiecutter.repo_name}}/users/{adapter.py => adapters.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/{adapter.py => adapters.py} (100%) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapters.py similarity index 100% rename from {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py rename to {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapters.py From 643b0aa2f35b201be0c45bb72a89d50e2be148c8 Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Tue, 16 Feb 2016 18:05:14 +0100 Subject: [PATCH 035/526] Updated the path to the user adapters. (see previous commit) --- {{cookiecutter.repo_name}}/config/settings/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/common.py b/{{cookiecutter.repo_name}}/config/settings/common.py index 0a5deebe..723888c6 100644 --- a/{{cookiecutter.repo_name}}/config/settings/common.py +++ b/{{cookiecutter.repo_name}}/config/settings/common.py @@ -211,8 +211,8 @@ AUTHENTICATION_BACKENDS = ( ACCOUNT_AUTHENTICATION_METHOD = 'username' ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_EMAIL_VERIFICATION = 'mandatory' -ACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapter.AccountAdapter' -SOCIALACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapter.SocialAccountAdapter' +ACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapters.AccountAdapter' +SOCIALACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapters.SocialAccountAdapter' ACCOUNT_ALLOW_REGISTRATION = True # Custom user app defaults From 5c51acd57056e6c9c340980470bccda125256cfe Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Tue, 16 Feb 2016 18:38:44 +0100 Subject: [PATCH 036/526] Updated contributors file --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 5a5b1f23..60f66c39 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -63,6 +63,7 @@ Listed in alphabetical order. Daniele Tricoli `@eriol`_ David Díaz `@ddiazpinto`_ @DavidDiazPinto Davur Clementsen `@dsclementsen`_ @davur + Eraldo Energy `@eraldo`_ Eyad Al Sibai `@eyadsibai`_ Felipe Arruda `@arruda`_ Garry Cairns `@garry-cairns`_ @@ -106,6 +107,7 @@ Listed in alphabetical order. .. _@ad-m: https://github.com/ad-m .. _@alb3rto: https://github.com/alb3rto .. _@caffodian: https://github.com/caffodian +.. _@eraldo: https://github.com/eraldo .. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza .. _@amjith: https://github.com/amjith .. _@zcho: https://github.com/zcho From 96a4ae33b506fce8a417bb656a6bf5af84066f13 Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Tue, 16 Feb 2016 18:53:37 +0100 Subject: [PATCH 037/526] Environment aware registration switch setting The status of the registration (open or closed) is now read from the project environment instead of hardcoded in the common settings file. --- {{cookiecutter.repo_name}}/config/settings/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/common.py b/{{cookiecutter.repo_name}}/config/settings/common.py index 0a5deebe..57e88765 100644 --- a/{{cookiecutter.repo_name}}/config/settings/common.py +++ b/{{cookiecutter.repo_name}}/config/settings/common.py @@ -213,7 +213,7 @@ ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_EMAIL_VERIFICATION = 'mandatory' ACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapter.AccountAdapter' SOCIALACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapter.SocialAccountAdapter' -ACCOUNT_ALLOW_REGISTRATION = True +ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True) # Custom user app defaults # Select the correct user model From 22acc55bccdcb548c9de49ce9472b0d882ae08fc Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Tue, 16 Feb 2016 19:07:20 +0100 Subject: [PATCH 038/526] Update settings.rst --- docs/settings.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index c253c18c..768ff618 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -27,7 +27,7 @@ DJANGO_EMAIL_SUBJECT_PREFIX EMAIL_SUBJECT_PREFIX n/a DJANGO_ALLOWED_HOSTS ALLOWED_HOSTS ['*'] ['your_domain_name'] ======================================= =========================== ============================================== ====================================================================== -The following table lists settings and their defaults for third-party applications, which may or may be part of your project: +The following table lists settings and their defaults for third-party applications, which may or may not be part of your project: ======================================= =========================== ============================================== ====================================================================== Environment Variable Django Setting Development Default Production Default @@ -47,9 +47,9 @@ DJANGO_OPBEAT_SECRET_TOKEN OPBEAT['SECRET_TOKEN'] n/a DJANGO_OPBEAT_ORGANIZATION_ID OPBEAT['ORGANIZATION_ID'] n/a raises error ======================================= =========================== ============================================== ====================================================================== --------------- -Other Settings --------------- +-------------------------- +Other Environment Settings +-------------------------- -ACCOUNT_ALLOW_REGISTRATION (=True) - Allow enable or disable user registration through `django-allauth` without disabling other characteristics like authentication and account management. +DJANGO_ACCOUNT_ALLOW_REGISTRATION (=True) + Allow enable or disable user registration through `django-allauth` without disabling other characteristics like authentication and account management. (Django Setting: ACCOUNT_ALLOW_REGISTRATION) From c7627f4c54055e3f3f4fb05720fcea7dca6a52de Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Thu, 18 Feb 2016 00:46:45 +0100 Subject: [PATCH 039/526] Added account registration switch to env example --- {{cookiecutter.repo_name}}/env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.repo_name}}/env.example b/{{cookiecutter.repo_name}}/env.example index 7eae951c..85c96d3c 100644 --- a/{{cookiecutter.repo_name}}/env.example +++ b/{{cookiecutter.repo_name}}/env.example @@ -12,6 +12,7 @@ DJANGO_MAILGUN_API_KEY= DJANGO_MAILGUN_SERVER_NAME= DJANGO_SERVER_EMAIL= DJANGO_SECURE_SSL_REDIRECT=False +DJANGO_ACCOUNT_ALLOW_REGISTRATION=True {% if cookiecutter.use_sentry == 'y' -%} DJANGO_SENTRY_DSN= {% endif %} From 6ef60301d10589c96c8402dfd72c2e38826d30a3 Mon Sep 17 00:00:00 2001 From: Julian Andres Cantillo Date: Thu, 18 Feb 2016 15:21:47 -0500 Subject: [PATCH 040/526] Added NEW_RELIC_APP_NAME env var for app.json When using the one-click deployment to Heroku the building process fails if the app uses NewRelic. --- {{cookiecutter.repo_name}}/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.repo_name}}/app.json b/{{cookiecutter.repo_name}}/app.json index 495770c7..078f87ea 100644 --- a/{{cookiecutter.repo_name}}/app.json +++ b/{{cookiecutter.repo_name}}/app.json @@ -22,6 +22,7 @@ "DJANGO_MAILGUN_SERVER_NAME": "", {% if cookiecutter.use_newrelic == "y" -%} "NEW_RELIC_LICENSE_KEY": "", + "NEW_RELIC_APP_NAME": "", {%- endif %} "DJANGO_MAILGUN_API_KEY": ""{% if cookiecutter.use_sentry == "y" -%}, "DJANGO_SENTRY_DSN": ""{%- endif %} From d614351d125605eb58e9d575bcde21d953b473f2 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Thu, 18 Feb 2016 21:49:25 +0100 Subject: [PATCH 041/526] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63066d8a..a4de0a5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-02-18] +### Changed +- The status of the registration (open or closed) is now read from the project environment instead of hardcoded in the common settings file. (@Eraldo) +- Renamed the adapter.py file to adapters.py to match the django naming convention. (@Eraldo) + + + ## [2016-02-15] ### Changed - In `users` app adapter, fix `is_open_for_signup` missing parameter (@oryx2) From 05abf3582c7dd21a1dac260f2ebb6d35420ceade Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 24 Feb 2016 12:22:22 -0800 Subject: [PATCH 042/526] Added beginning support for py.test --- CHANGELOG.md | 6 +++++- README.rst | 5 ++++- {{cookiecutter.repo_name}}/README.rst | 7 +++++++ {{cookiecutter.repo_name}}/pytest.ini | 2 ++ {{cookiecutter.repo_name}}/requirements/local.txt | 4 ++++ {{cookiecutter.repo_name}}/requirements/test.txt | 3 +++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 {{cookiecutter.repo_name}}/pytest.ini diff --git a/CHANGELOG.md b/CHANGELOG.md index a4de0a5d..36f786b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,14 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-02-24] +### Added +- Beginning support for `py.test` (@pydanny) + ## [2016-02-18] ### Changed - The status of the registration (open or closed) is now read from the project environment instead of hardcoded in the common settings file. (@Eraldo) -- Renamed the adapter.py file to adapters.py to match the django naming convention. (@Eraldo) +- Renamed the adapter.py file to adapters.py to match the django naming convention. (@Eraldo) diff --git a/README.rst b/README.rst index d7d7dbac..a408392e 100644 --- a/README.rst +++ b/README.rst @@ -21,7 +21,7 @@ Features --------- * For Django 1.9 -* Renders Django projects with 100% test coverage +* Renders Django projects with 100% starting test coverage * Twitter Bootstrap_ v4.0.0 - alpha_ * End-to-end via Hitch_ * AngularJS_ @@ -34,6 +34,9 @@ Features * Media storage using Amazon S3 * Docker support using docker-compose_ for development and production * Procfile_ for deploying to Heroku +* Works with Python 2.7.x or 3.5.x! +* Run tests with unittest or py.test! + Optional Integrations --------------------- diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index cbbe3254..b9e78134 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -36,6 +36,13 @@ To run the tests, check your test coverage, and generate an HTML coverage report $ coverage html $ open htmlcov/index.html +Running tests with py.test +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + $ py.test + Live reloading and Sass CSS compilation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/{{cookiecutter.repo_name}}/pytest.ini b/{{cookiecutter.repo_name}}/pytest.ini new file mode 100644 index 00000000..d19d28c5 --- /dev/null +++ b/{{cookiecutter.repo_name}}/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +DJANGO_SETTINGS_MODULE=config.settings.local diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 3253fdff..278f59e0 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -13,3 +13,7 @@ django-debug-toolbar==1.4 # improved REPL ipdb==0.8.1 + +# pytest! +pytest-django==2.9.1 +pytest-sugar=0.5.1 diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index 948a040b..bb7a2ae7 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -12,3 +12,6 @@ django_coverage_plugin==1.2.2 flake8==2.5.2 django-test-plus==1.0.11 factory_boy==2.6.0 + +# pytest! +pytest-django==2.9.1 From 084d187b7bef72339d0c7ca2889d079a816bd076 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 24 Feb 2016 12:49:06 -0800 Subject: [PATCH 043/526] Fixed borked pytest-sugar requirement --- {{cookiecutter.repo_name}}/requirements/local.txt | 2 +- {{cookiecutter.repo_name}}/requirements/test.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 278f59e0..43448715 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -16,4 +16,4 @@ ipdb==0.8.1 # pytest! pytest-django==2.9.1 -pytest-sugar=0.5.1 +pytest-sugar==0.5.1 diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index bb7a2ae7..4d97d99f 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -15,3 +15,4 @@ factory_boy==2.6.0 # pytest! pytest-django==2.9.1 +pytest-sugar==0.5.1 From 2e5e361c13014a75b68a07bedfd5cf19ab420e41 Mon Sep 17 00:00:00 2001 From: Eraldo Energy Date: Wed, 24 Feb 2016 22:50:32 +0100 Subject: [PATCH 044/526] Fixed missing closing tag for container. --- .../{{cookiecutter.repo_name}}/templates/users/user_list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/users/user_list.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/users/user_list.html index 8c38e484..8ea63bc4 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/users/user_list.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/users/user_list.html @@ -17,4 +17,6 @@ + + {% endblock content %}{% endraw %} From 260bbb0a303208f256b9c1f1981f7c5ae962e05d Mon Sep 17 00:00:00 2001 From: Matt Menzenski Date: Sat, 27 Feb 2016 21:27:27 -0600 Subject: [PATCH 045/526] fix minor typos in project README --- {{cookiecutter.repo_name}}/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index b9e78134..c57a953a 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -64,7 +64,7 @@ To run a celery worker: cd {{cookiecutter.repo_name}} celery -A {{cookiecutter.repo_name}}.taskapp worker -l info -Please note: For Celerys import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right. +Please note: For Celery's import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right. {% endif %} @@ -132,7 +132,7 @@ The testing framework runs Django, Celery (if enabled), Postgres, HitchSMTP (a m Deployment ---------- -We providing tools and instructions for deploying using Docker and Heroku. +We provide tools and instructions for deploying using Docker and Heroku. Heroku ^^^^^^ From 04f852ca652ad9c8d8b0634c2e5d0e6eed40e408 Mon Sep 17 00:00:00 2001 From: solvire Date: Sun, 28 Feb 2016 01:18:33 -0800 Subject: [PATCH 046/526] pylint-django gets "no-member" error: known issue: implemented suggested workaround A known issue with pylint-django https://github.com/landscapeio/pylint-django/issues/53 https://github.com/christianmlong/personal/commit/2939cb1d1a08bda225441e0b5326228fb757ee15 Tested on: pylint==1.5.4 pylint-django==0.7.1 --- {{cookiecutter.repo_name}}/.pylintrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/.pylintrc b/{{cookiecutter.repo_name}}/.pylintrc index ce2204c9..1a199286 100644 --- a/{{cookiecutter.repo_name}}/.pylintrc +++ b/{{cookiecutter.repo_name}}/.pylintrc @@ -8,4 +8,7 @@ max-line-length=120 disable=missing-docstring,invalid-name [DESIGN] -max-parents=13 \ No newline at end of file +max-parents=13 + +[TYPECHECK] +generated-members=REQUEST,acl_users,aq_parent,"[a-zA-Z]+_set{1,2}",save,delete From 9ea65968c151a7962e14c48f683f6c0b6adb7cdc Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 1 Mar 2016 22:13:07 -0300 Subject: [PATCH 047/526] update requirements --- CHANGELOG.md | 9 +++++++++ requirements.txt | 6 +++--- {{cookiecutter.repo_name}}/requirements/base.txt | 2 +- {{cookiecutter.repo_name}}/requirements/local.txt | 6 +++--- .../requirements/production.txt | 2 +- {{cookiecutter.repo_name}}/requirements/test.txt | 4 ++-- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 12 ++++++------ .../{{cookiecutter.repo_name}}/templates/base.html | 2 +- 8 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36f786b8..0f7e9c19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,19 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-03-01] +### Changed +- Update version of Django, flake8, pyflakes, pytest, factory_boy, ipdb, Werkzeug, gevent (@luzfcb) +- Update version of Hitch tests dependencies: click, hitchserve, hitchtest, ipython, psutil, python-dateutil(@luzfcb) +- Update Tether (JS) version to 1.2.0 (@luzfcb) + ## [2016-02-24] ### Added - Beginning support for `py.test` (@pydanny) +### Changed +- Fixed missing div closing tag for "container" on user_list.html (@Eraldo) + ## [2016-02-18] ### Changed - The status of the registration (open or closed) is now read from the project environment instead of hardcoded in the common settings file. (@Eraldo) diff --git a/requirements.txt b/requirements.txt index d1f67aaf..50e6bd23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ cookiecutter==1.3.0 -flake8==2.5.2 +flake8==2.5.4 sh==1.11 binaryornot==0.4.0 # Testing -pytest==2.8.7 +pytest==2.9.0 pep8==1.7.0 -pyflakes==1.0.0 +pyflakes==1.1.0 tox==2.3.1 diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 8c40dd5d..64f237f8 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.9.2 +django==1.9.3 # Configuration django-environ==0.4.0 diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 43448715..e9d8bcc0 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -4,15 +4,15 @@ coverage==4.0.3 django_coverage_plugin==1.2.2 Sphinx django-extensions==1.6.1 -Werkzeug==0.11.3 +Werkzeug==0.11.4 django-test-plus==1.0.11 -factory_boy==2.6.0 +factory_boy==2.6.1 # django-debug-toolbar that works with Django 1.5+ django-debug-toolbar==1.4 # improved REPL -ipdb==0.8.1 +ipdb==0.9.0 # pytest! pytest-django==2.9.1 diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index 1ef2e9bf..0c25b909 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -15,7 +15,7 @@ psycopg2==2.6.1 gevent==1.0.2 {% else %} # there's no python 3 support in stable, have to use the latest release candidate for gevent -gevent==1.1rc3 +gevent==1.1rc5 {% endif %} gunicorn==19.4.5 diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index 4d97d99f..c0a3fd23 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -9,9 +9,9 @@ psycopg2==2.6.1 coverage==4.0.3 django_coverage_plugin==1.2.2 -flake8==2.5.2 +flake8==2.5.4 django-test-plus==1.0.11 -factory_boy==2.6.0 +factory_boy==2.6.1 # pytest! pytest-django==2.9.1 diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 9428b3a3..41995b91 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -1,5 +1,5 @@ backports-abc==0.4 -click==6.2 +click==6.3 colorama==0.3.6 decorator==4.0.9 docopt==0.6.2 @@ -9,12 +9,12 @@ hitchpostgres==0.7.0 hitchpython==0.5.3 hitchredis==0.4.6 hitchselenium==0.5.1 -hitchserve==0.4.8 +hitchserve==0.4.9 hitchsmtp==0.2.1 hitchsystem==0.1.2 -hitchtest==0.9.6 +hitchtest==0.9.7 humanize==0.5.1 -ipython==4.1.1 +ipython==4.1.2 ipython-genutils==0.1.0 Jinja2==2.8 jupyter-client==4.1.1 @@ -24,11 +24,11 @@ path.py==8.1.2 patool==1.12 pexpect==4.0.1 pickleshare==0.6 -psutil==3.4.2 +psutil==4.0.0 ptyprocess==0.5.1 pykwalify==1.5.0 python-build==0.2.13 -python-dateutil==2.4.2 +python-dateutil==2.5.0 pyuv==1.2.0 PyYAML==3.11 pyzmq==15.2.0 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index 8113478c..9c0324c5 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -96,7 +96,7 @@ - + From 047c49711308864ccff06260befa86367ac4c8e8 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 1 Mar 2016 22:16:36 -0300 Subject: [PATCH 048/526] update django version in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 152c6f82..717327f3 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = "1.9.2" +version = "1.9.3" if sys.argv[-1] == 'tag': os.system("git tag -a %s -m 'version %s'" % (version, version)) From 018560e27a99fa566cd1bec1b6db91214fe56884 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 1 Mar 2016 22:47:38 -0300 Subject: [PATCH 049/526] update Hitch test requirements --- CHANGELOG.md | 2 +- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f7e9c19..592b64e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-03-01] ### Changed - Update version of Django, flake8, pyflakes, pytest, factory_boy, ipdb, Werkzeug, gevent (@luzfcb) -- Update version of Hitch tests dependencies: click, hitchserve, hitchtest, ipython, psutil, python-dateutil(@luzfcb) +- Update version of Hitch tests dependencies: click, hitchserve, hitchsystem, hitchtest, ipython, psutil, python-dateutil(@luzfcb) - Update Tether (JS) version to 1.2.0 (@luzfcb) ## [2016-02-24] diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 41995b91..2389c04c 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -11,8 +11,8 @@ hitchredis==0.4.6 hitchselenium==0.5.1 hitchserve==0.4.9 hitchsmtp==0.2.1 -hitchsystem==0.1.2 -hitchtest==0.9.7 +hitchsystem==0.1.3 +hitchtest==0.9.8 humanize==0.5.1 ipython==4.1.2 ipython-genutils==0.1.0 From b368dd7e36a8010dc9cfdcac6b4b0eceb447f38c Mon Sep 17 00:00:00 2001 From: Cristian Vargas Date: Wed, 2 Mar 2016 09:49:34 -0500 Subject: [PATCH 050/526] Make sure that STATIC_URL != MEDIA_URL --- {{cookiecutter.repo_name}}/config/settings/production.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index abf5fc99..9e799e5b 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -119,7 +119,11 @@ AWS_HEADERS = { # URL that handles the media served from MEDIA_ROOT, used for managing # stored files. +{% if cookiecutter.use_whitenoise == 'y' -%} MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME +{% else %} +MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME +{%- endif %} # Static Assets # ------------------------ @@ -127,7 +131,7 @@ MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' {% else %} STATICFILES_STORAGE = DEFAULT_FILE_STORAGE -STATIC_URL = MEDIA_URL +STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME # See: https://github.com/antonagestam/collectfast # For Django 1.7+, 'collectfast' should come before From bd39eddf7789e06a8fc2b45b1ceaa0c05af6df41 Mon Sep 17 00:00:00 2001 From: Cristian Vargas Date: Wed, 2 Mar 2016 16:02:28 -0500 Subject: [PATCH 051/526] Update file storages and put them in separate folders --- {{cookiecutter.repo_name}}/config/settings/production.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index 9e799e5b..f541843f 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -97,7 +97,6 @@ INSTALLED_APPS += ("gunicorn", ) INSTALLED_APPS += ( 'storages', ) -DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' AWS_ACCESS_KEY_ID = env('DJANGO_AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = env('DJANGO_AWS_SECRET_ACCESS_KEY') @@ -122,6 +121,12 @@ AWS_HEADERS = { {% if cookiecutter.use_whitenoise == 'y' -%} MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME {% else %} +# See:http://stackoverflow.com/questions/10390244/ +from storages.backends.s3boto import S3BotoStorage +StaticRootS3BotoStorage = lambda: S3BotoStorage(location='static') +MediaRootS3BotoStorage = lambda: S3BotoStorage(location='media') +DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage' + MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME {%- endif %} @@ -130,8 +135,8 @@ MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME {% if cookiecutter.use_whitenoise == 'y' -%} STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' {% else %} -STATICFILES_STORAGE = DEFAULT_FILE_STORAGE STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME +STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage' # See: https://github.com/antonagestam/collectfast # For Django 1.7+, 'collectfast' should come before From 45bbd27f39f36f6ebf84e6b4de87a8e3b695158f Mon Sep 17 00:00:00 2001 From: Aaron Eikenberry Date: Wed, 2 Mar 2016 22:16:25 -0600 Subject: [PATCH 052/526] updates docker-compose format to version 2 #483 --- {{cookiecutter.repo_name}}/dev.yml | 37 ++++---- {{cookiecutter.repo_name}}/docker-compose.yml | 92 +++++++++++-------- 2 files changed, 74 insertions(+), 55 deletions(-) diff --git a/{{cookiecutter.repo_name}}/dev.yml b/{{cookiecutter.repo_name}}/dev.yml index d018f7cd..29b2a9ff 100644 --- a/{{cookiecutter.repo_name}}/dev.yml +++ b/{{cookiecutter.repo_name}}/dev.yml @@ -1,17 +1,22 @@ -postgres: - image: postgres:9.5 - volumes: - # If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed - # for more info see here: https://github.com/boot2docker/boot2docker/issues/581 - - /data/dev/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data +version: '2' +services: + postgres: + image: postgres:9.5 + volumes: + # If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed + # for more info see here: https://github.com/boot2docker/boot2docker/issues/581 + - /data/dev/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data -django: - dockerfile: Dockerfile-dev - build: . - command: python /app/manage.py runserver_plus 0.0.0.0:8000 - volumes: - - .:/app - ports: - - "8000:8000" - links: - - postgres + django: + build: + context: . + dockerfile: Dockerfile-dev + command: python /app/manage.py runserver_plus 0.0.0.0:8000 + depends_on: + - postgres + volumes: + - .:/app + ports: + - "8000:8000" + links: + - postgres diff --git a/{{cookiecutter.repo_name}}/docker-compose.yml b/{{cookiecutter.repo_name}}/docker-compose.yml index dc681037..13b65e66 100644 --- a/{{cookiecutter.repo_name}}/docker-compose.yml +++ b/{{cookiecutter.repo_name}}/docker-compose.yml @@ -1,43 +1,57 @@ -postgres: - image: postgres:9.5 - volumes: - - /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data - env_file: .env +version: '2' +services: + postgres: + image: postgres:9.5 + volumes: + - /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data + env_file: .env -django: - build: . - user: django - links: - - postgres - - redis - command: /gunicorn.sh - env_file: .env + django: + build: + context: . + user: django + links: + - postgres + - redis + command: /gunicorn.sh + env_file: .env + depends_on: + - postgres + - redis -nginx: - build: ./compose/nginx - links: - - django - ports: - - "0.0.0.0:80:80" + nginx: + build: ./compose/nginx + links: + - django + ports: + - "0.0.0.0:80:80" -redis: - image: redis:3.0 -{% if cookiecutter.use_celery == 'y' %} -celeryworker: - build: . - user: django - env_file: .env - links: - - postgres - - redis - command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO + redis: + image: redis:3.0 + {% if cookiecutter.use_celery == 'y' %} + celeryworker: + build: + context: . + user: django + env_file: .env + links: + - postgres + - redis + command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO + depends_on: + - postgres + - redis -celerybeat: - build: . - user: django - env_file: .env - links: - - postgres - - redis - command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO -{% endif %} + celerybeat: + build: + context: . + user: django + env_file: .env + links: + - postgres + - redis + command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO + depends_on: + - postgres + - redis + {% endif %} From 76e23d2cf5c2227cd6491e84b6f889bfebf90526 Mon Sep 17 00:00:00 2001 From: Aaron Eikenberry Date: Wed, 2 Mar 2016 22:43:17 -0600 Subject: [PATCH 053/526] customize docker-compose version on travis-ci --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 701bc097..874baf24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,21 @@ services: - docker language: python + python: 3.5 + env: + DOCKER_COMPOSE_VERSION: 1.6.0 - TOX_ENV=py27 - TOX_ENV=py34 - TOX_ENV=py35 +before_install: + - sudo rm /usr/local/bin/docker-compose + - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose + - chmod +x docker-compose + - sudo mv docker-compose /usr/local/bin + script: - tox -e $TOX_ENV - sh tests/test_docker.sh From c084e6e90529193a1f25b449d4fc603aa97f3dc0 Mon Sep 17 00:00:00 2001 From: Aaron Eikenberry Date: Wed, 2 Mar 2016 22:46:49 -0600 Subject: [PATCH 054/526] fixes typo in travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 874baf24..d80918d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ language: python python: 3.5 env: - DOCKER_COMPOSE_VERSION: 1.6.0 + - DOCKER_COMPOSE_VERSION: 1.6.0 - TOX_ENV=py27 - TOX_ENV=py34 - TOX_ENV=py35 From 5659cf302c990cd4e65f15c19b0595589a1ed919 Mon Sep 17 00:00:00 2001 From: Aaron Eikenberry Date: Wed, 2 Mar 2016 22:52:00 -0600 Subject: [PATCH 055/526] Trying with hard-coded version :( --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d80918d6..a11a8167 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,13 @@ language: python python: 3.5 env: - - DOCKER_COMPOSE_VERSION: 1.6.0 - TOX_ENV=py27 - TOX_ENV=py34 - TOX_ENV=py35 before_install: - sudo rm /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose + - curl -L https://github.com/docker/compose/releases/download/1.6.0/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin From 8f5af542c584e9ea1f1287b0b6fd98b56fc25b46 Mon Sep 17 00:00:00 2001 From: Aaron Eikenberry Date: Thu, 3 Mar 2016 09:20:20 -0600 Subject: [PATCH 056/526] update docker-engine on travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a11a8167..b548b923 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,8 @@ env: - TOX_ENV=py35 before_install: + - sudo apt-get update + - sudo apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" docker-engine=1.10.1-0~trusty - sudo rm /usr/local/bin/docker-compose - curl -L https://github.com/docker/compose/releases/download/1.6.0/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose From 8a3d36fe4055c1981945296fa33a9d505b2ab82d Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Sun, 6 Mar 2016 01:30:27 -0300 Subject: [PATCH 057/526] update requirements --- CHANGELOG.md | 7 +++++++ README.rst | 8 ++++++-- cookiecutter.json | 2 +- setup.py | 2 +- {{cookiecutter.repo_name}}/requirements/base.txt | 4 ++-- {{cookiecutter.repo_name}}/requirements/local.txt | 2 +- {{cookiecutter.repo_name}}/requirements/test.txt | 2 +- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 2 +- 8 files changed, 20 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 592b64e1..bd8751cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-03-05] +### Changed +- Update version of Django, celery, django-test-plus (@luzfcb) +- Update version of Hitch tests dependencies: jupyter_client (@luzfcb) +- Update 'now' date in cookiecutter.json (@luzfcb) +- Update the usage example in README (@luzfcb) + ## [2016-03-01] ### Changed - Update version of Django, flake8, pyflakes, pytest, factory_boy, ipdb, Werkzeug, gevent (@luzfcb) diff --git a/README.rst b/README.rst index a408392e..8a8996a4 100644 --- a/README.rst +++ b/README.rst @@ -114,7 +114,7 @@ It prompts you for questions. Answer them:: domain_name [example.com]: myreddit.com version [0.1.0]: 0.0.1 timezone [UTC]: - now [2015/11/22]: 2015/11/22 + now [2016/03/01]: 2016/03/05 year [2015]: use_whitenoise [y]: n use_celery [n]: y @@ -124,7 +124,11 @@ It prompts you for questions. Answer them:: use_opbeat [n]: y windows [n]: n use_python2 [n]: y - + Select open_source_license: + 1 - MIT + 2 - BSD + 3 - Not open source + Choose from 1, 2, 3 [1]: 1 Enter the project and take a look around:: diff --git a/cookiecutter.json b/cookiecutter.json index b70c4bba..ef4dc641 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -7,7 +7,7 @@ "domain_name": "example.com", "version": "0.1.0", "timezone": "UTC", - "now": "2016/01/29", + "now": "2016/03/05", "year": "{{ cookiecutter.now[:4] }}", "use_whitenoise": "y", "use_celery": "n", diff --git a/setup.py b/setup.py index 717327f3..f6facb46 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = "1.9.3" +version = "1.9.4" if sys.argv[-1] == 'tag': os.system("git tag -a %s -m 'version %s'" % (version, version)) diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 64f237f8..836d7241 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.9.3 +django==1.9.4 # Configuration django-environ==0.4.0 @@ -52,7 +52,7 @@ django-redis==4.3.0 redis>=2.10.0 {% if cookiecutter.use_celery == "y" %} -celery==3.1.20 +celery==3.1.21 {% endif %} # Your custom requirements go here diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index e9d8bcc0..821b204a 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -5,7 +5,7 @@ django_coverage_plugin==1.2.2 Sphinx django-extensions==1.6.1 Werkzeug==0.11.4 -django-test-plus==1.0.11 +django-test-plus==1.0.12 factory_boy==2.6.1 # django-debug-toolbar that works with Django 1.5+ diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index c0a3fd23..db5e70b8 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -10,7 +10,7 @@ psycopg2==2.6.1 coverage==4.0.3 django_coverage_plugin==1.2.2 flake8==2.5.4 -django-test-plus==1.0.11 +django-test-plus==1.0.12 factory_boy==2.6.1 # pytest! diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 2389c04c..e4b91c96 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -17,7 +17,7 @@ humanize==0.5.1 ipython==4.1.2 ipython-genutils==0.1.0 Jinja2==2.8 -jupyter-client==4.1.1 +jupyter-client==4.2.0 jupyter-core==4.0.6 MarkupSafe==0.23 path.py==8.1.2 From 357327295281d5f70be9611cac81c932f2db0cd4 Mon Sep 17 00:00:00 2001 From: Catherine Devlin Date: Sun, 6 Mar 2016 05:05:24 -0500 Subject: [PATCH 058/526] Protect from bad (non-importable) repo names, like those with dashes --- cookiecutter.json | 2 +- hooks/pre_gen_project.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 hooks/pre_gen_project.py diff --git a/cookiecutter.json b/cookiecutter.json index ef4dc641..28d31fe3 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,6 +1,6 @@ { "project_name": "project_name", - "repo_name": "{{ cookiecutter.project_name|replace(' ', '_') }}", + "repo_name": "{{ cookiecutter.project_name|replace(' ', '_')|replace('-', '_') }}", "author_name": "Your Name", "email": "Your email", "description": "A short description of the project.", diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py new file mode 100644 index 00000000..1e8c0a78 --- /dev/null +++ b/hooks/pre_gen_project.py @@ -0,0 +1,4 @@ +repo_name = '{{ cookiecutter.repo_name }}' + +if hasattr(repo_name, 'isidentifier'): + assert repo_name.isidentifier(), 'Repo name should be valid Python identifier!' From 9b5f91efb3945c3f39d7ac44b8c6fd9b9f0f0324 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:07:48 +0100 Subject: [PATCH 059/526] updates docs for docker 1.10 --- docs/deployment-with-docker.rst | 6 +-- docs/developing-locally-docker.rst | 66 +++++++++++------------------- 2 files changed, 26 insertions(+), 46 deletions(-) diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index e5b0bfd4..7e64a50e 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -16,8 +16,8 @@ to run docker (with compose) on production. Prerequisites: -* docker (tested with 1.8) -* docker-compose (tested with 0.4) +* docker (at least 1.10) +* docker-compose (at least 1.6) Before you start, check out the `docker-compose.yml` file in the root of this project. This is where each component of this application gets its configuration from. It consists of a `postgres` service that runs the database, `redis` @@ -67,7 +67,7 @@ To create a superuser, run:: If you need a shell, run:: - docker-compose run django python manage.py shell_plus + docker-compose run django python manage.py shell To get an output of all running containers. diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index d1b7aa2e..0eaf6d51 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -7,24 +7,24 @@ The steps below will get you up and running with a local development environment All of these commands assume you are in the root of your generated project. Prerequisites --------------- +------------- -If you don't already have these installed, get them all by installing `Docker Toolbox`_. +You'll need at least docker 1.10. -* docker -* docker-machine -* docker-compose -* virtualbox +If you don't already have it installed, follow the instructions for your OS: + - On Mac OS X/Windows, you'll need `Docker Toolbox`_ + - On Linux, you'll need `docker-engine`_ .. _`Docker Toolbox`: https://github.com/docker/toolbox/releases +.. _`docker-engine`: https://docs.docker.com/engine/installation/ Create the Machine (Optional) -------------------------------- +----------------------------- -On Ubuntu you have native Docker, so you don't need to create a VM with +On Linux you have native Docker, so you don't need to create a VM with docker-machine to use it. -However, on Mac/Windows/other systems without native Docker, you'll want to +However, on Mac/Windows/other systems without native Docker, you'll want to start by creating a VM with docker-machine:: $ docker-machine create --driver virtualbox dev1 @@ -34,7 +34,7 @@ name them accordingly. Instead of 'dev1' you might have 'dev2', 'myproject', 'djangopackages', et al. Get the IP Address --------------------- +------------------ Once your machine is up and running, run this:: @@ -43,26 +43,6 @@ Once your machine is up and running, run this:: This is also the IP address where the Django project will be served from. -Saving changes --------------- - -If you are using OS X or Windows, you need to create a /data partition inside the -virtual machine that runs the docker deamon in order make all changes persistent. -If you don't do that your /data directory will get wiped out on every reboot. - -To create a persistent folder, log into the virtual machine by running:: - - $ docker-machine ssh dev1 - $ sudo su - $ mkdir /data - $ echo 'ln -sfn /mnt/sda1/data /data' >> /var/lib/boot2docker/bootlocal.sh - -In case you are wondering why you can't use a host volume to keep the files on -your mac: As of `boot2docker` 1.7 you'll run into permission problems with mounted -host volumes if the container creates his own user and chown's the directories -on the volume. Postgres is doing that, so we need this quick fix to ensure that -all development data persists. - Build the Stack --------------- @@ -70,15 +50,15 @@ This can take a while, especially the first time you run this particular command on your development system:: $ docker-compose -f dev.yml build - -If you want to build the production environment you don't have to pass an argument -f, it will automatically use docker-compose.yml. + +If you want to build the production environment you don't have to pass an argument -f, it will automatically use docker-compose.yml. Boot the System --------------- -This brings up both Django and PostgreSQL. +This brings up both Django and PostgreSQL. -The first time it is run it might take a while to get started, but subsequent +The first time it is run it might take a while to get started, but subsequent runs will occur quickly. Open a terminal at the project root and run the following for local development:: @@ -92,12 +72,12 @@ You can also set the environment variable ``COMPOSE_FILE`` pointing to ``dev.yml And then run:: $ docker-compose up - -Running management commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As with any shell command that we wish to run in our container, this is done -using the ``docker-compose run`` command. +Running management commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As with any shell command that we wish to run in our container, this is done +using the ``docker-compose run`` command. To migrate your app and to create a superuser, run:: @@ -107,17 +87,17 @@ To migrate your app and to create a superuser, run:: Here we specify the ``django`` container as the location to run our management commands. Production Mode -~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~ Instead of using `dev.yml`, you would use `docker-compose.yml`. Other Useful Tips ------------------- +----------------- Make a machine the active unit -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This tells our computer that all future commands are specifically for the dev1 machine. +This tells our computer that all future commands are specifically for the dev1 machine. Using the ``eval`` command we can switch machines as needed. :: From 982b21d61bc2f48bab65a6cb9a936949cbd885fa Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:12:55 +0100 Subject: [PATCH 060/526] move from links to depends_on --- {{cookiecutter.repo_name}}/compose/django/entrypoint.sh | 8 ++++---- {{cookiecutter.repo_name}}/docker-compose.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh b/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh index d7a34f03..e9286baa 100644 --- a/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh +++ b/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh @@ -7,11 +7,11 @@ set -e export REDIS_URL=redis://redis:6379 # the official postgres image uses 'postgres' as default user if not set explictly. -if [ -z "$POSTGRES_ENV_POSTGRES_USER" ]; then - export POSTGRES_ENV_POSTGRES_USER=postgres -fi +if [ -z "$POSTGRES_USER" ]; then + export POSTGRES_USER=postgres +fi -export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRES_PASSWORD@postgres:5432/$POSTGRES_ENV_POSTGRES_USER +export DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_USER {% if cookiecutter.use_celery == 'y' %} export CELERY_BROKER_URL=$REDIS_URL/0 {% endif %} diff --git a/{{cookiecutter.repo_name}}/docker-compose.yml b/{{cookiecutter.repo_name}}/docker-compose.yml index 13b65e66..2a523dd6 100644 --- a/{{cookiecutter.repo_name}}/docker-compose.yml +++ b/{{cookiecutter.repo_name}}/docker-compose.yml @@ -10,7 +10,7 @@ services: build: context: . user: django - links: + depends_on: - postgres - redis command: /gunicorn.sh @@ -21,7 +21,7 @@ services: nginx: build: ./compose/nginx - links: + depends_on: - django ports: - "0.0.0.0:80:80" @@ -34,7 +34,7 @@ services: context: . user: django env_file: .env - links: + depends_on: - postgres - redis command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO @@ -47,7 +47,7 @@ services: context: . user: django env_file: .env - links: + depends_on: - postgres - redis command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO From 93c65590eecb66af2000b7d616bc700af8aed91f Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:15:05 +0100 Subject: [PATCH 061/526] adds a default postgres user during development --- {{cookiecutter.repo_name}}/dev.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.repo_name}}/dev.yml b/{{cookiecutter.repo_name}}/dev.yml index 29b2a9ff..4b02e5b6 100644 --- a/{{cookiecutter.repo_name}}/dev.yml +++ b/{{cookiecutter.repo_name}}/dev.yml @@ -6,6 +6,8 @@ services: # If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed # for more info see here: https://github.com/boot2docker/boot2docker/issues/581 - /data/dev/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data + environment: + - POSTGRES_USER={{cookiecutter.repo_name}} django: build: From eb4092c159ca61f87119c1fe8ab49bf99153e0e1 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:41:58 +0100 Subject: [PATCH 062/526] adds docker database controls --- .../compose/postgres/Dockerfile | 11 ++++ .../compose/postgres/backup.sh | 22 ++++++++ .../compose/postgres/list-backups.sh | 4 ++ .../compose/postgres/restore.sh | 56 +++++++++++++++++++ {{cookiecutter.repo_name}}/dev.yml | 3 +- {{cookiecutter.repo_name}}/docker-compose.yml | 1 + 6 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 {{cookiecutter.repo_name}}/compose/postgres/Dockerfile create mode 100644 {{cookiecutter.repo_name}}/compose/postgres/backup.sh create mode 100644 {{cookiecutter.repo_name}}/compose/postgres/list-backups.sh create mode 100644 {{cookiecutter.repo_name}}/compose/postgres/restore.sh diff --git a/{{cookiecutter.repo_name}}/compose/postgres/Dockerfile b/{{cookiecutter.repo_name}}/compose/postgres/Dockerfile new file mode 100644 index 00000000..33272364 --- /dev/null +++ b/{{cookiecutter.repo_name}}/compose/postgres/Dockerfile @@ -0,0 +1,11 @@ +FROM postgres:9.5 + +# add backup scripts +ADD backup.sh /usr/local/bin/backup +ADD restore.sh /usr/local/bin/restore +ADD list-backups.sh /usr/local/bin/list-backups + +# make them executable +RUN chmod +x /usr/local/bin/restore +RUN chmod +x /usr/local/bin/list-backups +RUN chmod +x /usr/local/bin/backup diff --git a/{{cookiecutter.repo_name}}/compose/postgres/backup.sh b/{{cookiecutter.repo_name}}/compose/postgres/backup.sh new file mode 100644 index 00000000..97c95e1d --- /dev/null +++ b/{{cookiecutter.repo_name}}/compose/postgres/backup.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# stop on errors +set -e + +# we might run into trouble when using the default `postgres` user, e.g. when dropping the postgres +# database in restore.sh. Check that something else is used here +if [ "$POSTGRES_USER" == "postgres" ] +then + echo "creating a backup as the postgres user is not supported, make sure to set the POSTGRES_USER environment variable" + exit 1 +fi + +# export the postgres password so that subsequent commands don't ask for it +export PGPASSWORD=$POSTGRES_PASSWORD + +echo "creating backup" +echo "---------------" + +FILENAME=backup_$(date +'%Y_%m_%dT%H_%M_%S').sql +pg_dump -h postgres -U $POSTGRES_USER >> /backups/$FILENAME + +echo "successfully created backup $FILENAME" diff --git a/{{cookiecutter.repo_name}}/compose/postgres/list-backups.sh b/{{cookiecutter.repo_name}}/compose/postgres/list-backups.sh new file mode 100644 index 00000000..75972b75 --- /dev/null +++ b/{{cookiecutter.repo_name}}/compose/postgres/list-backups.sh @@ -0,0 +1,4 @@ +#!/bin/bash +echo "listing available backups" +echo "-------------------------" +ls /backups/ diff --git a/{{cookiecutter.repo_name}}/compose/postgres/restore.sh b/{{cookiecutter.repo_name}}/compose/postgres/restore.sh new file mode 100644 index 00000000..75008280 --- /dev/null +++ b/{{cookiecutter.repo_name}}/compose/postgres/restore.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# stop on errors +set -e + +# we might run into trouble when using the default `postgres` user, e.g. when dropping the postgres +# database in restore.sh. Check that something else is used here +if [ "$POSTGRES_USER" == "postgres" ] +then + echo "restoring as the postgres user is not supported, make sure to set the POSTGRES_USER environment variable" + exit 1 +fi + +# export the postgres password so that subsequent commands don't ask for it +export PGPASSWORD=$POSTGRES_PASSWORD + +# check that we have an argument for a filename candidate +if [[ $# -eq 0 ]] ; then + echo 'usage:' + echo ' docker-compose run postgres restore ' + echo '' + echo 'to get a list of available backups, run:' + echo ' docker-compose run postgres list-backups' + exit 1 +fi + +# set the backupfile variable +BACKUPFILE=/backups/$1 + +# check that the file exists +if ! [ -f $BACKUPFILE ]; then + echo "backup file not found" + echo 'to get a list of available backups, run:' + echo ' docker-compose run postgres list-backups' + exit 1 +fi + +echo "beginning restore from $1" +echo "-------------------------" + +# delete the db +# deleting the db can fail. Spit out a comment if this happens but continue since the db +# is created in the next step +echo "deleting old database $POSTGRES_USER" +if dropdb -h postgres -U $POSTGRES_USER $POSTGRES_USER +then echo "deleted $POSTGRES_USER database" +else echo "database $POSTGRES_USER does not exist, continue" +fi + +# create a new database +echo "creating new database $POSTGRES_USER" +createdb -h postgres -U $POSTGRES_USER $POSTGRES_USER -O $POSTGRES_USER + +# restore the database +echo "restoring database $POSTGRES_USER" +psql -h postgres -U $POSTGRES_USER < $BACKUPFILE diff --git a/{{cookiecutter.repo_name}}/dev.yml b/{{cookiecutter.repo_name}}/dev.yml index 4b02e5b6..7672e785 100644 --- a/{{cookiecutter.repo_name}}/dev.yml +++ b/{{cookiecutter.repo_name}}/dev.yml @@ -1,11 +1,12 @@ version: '2' services: postgres: - image: postgres:9.5 + build: ./compose/postgres volumes: # If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed # for more info see here: https://github.com/boot2docker/boot2docker/issues/581 - /data/dev/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data + - /data/dev/{{cookiecutter.repo_name}}/postgres-backups:/backups environment: - POSTGRES_USER={{cookiecutter.repo_name}} diff --git a/{{cookiecutter.repo_name}}/docker-compose.yml b/{{cookiecutter.repo_name}}/docker-compose.yml index 2a523dd6..20fad0b7 100644 --- a/{{cookiecutter.repo_name}}/docker-compose.yml +++ b/{{cookiecutter.repo_name}}/docker-compose.yml @@ -4,6 +4,7 @@ services: image: postgres:9.5 volumes: - /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data + - /data/{{cookiecutter.repo_name}}/postgres-backups:/backups env_file: .env django: From 5b1b6ae4aacec9eb848b76eb9fbbb0719993daaa Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:42:46 +0100 Subject: [PATCH 063/526] added docker database backups documentation --- docs/developing-locally-docker.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 0eaf6d51..8cbf7234 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -91,6 +91,29 @@ Production Mode Instead of using `dev.yml`, you would use `docker-compose.yml`. +Database Backups +~~~~~~~~~~~~~~~~ + +The database has to be running to create/restore a backup. + +First, run the app with `docker-compose -f dev.yml up`. + +To create a backup, run:: + + docker-compose -f dev.yml run postgres backup + + +To list backups, run:: + + docker-compose -f dev.yml run postgres list-backups + + +To restore a backup, run:: + + docker-compose -f dev.yml run postgres restore filename.sql + + + Other Useful Tips ----------------- From 57f296b56abaa3821b637d7c8ba7c471693f290f Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:45:30 +0100 Subject: [PATCH 064/526] adds @aeikenberry and @menzenski to contributors --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 60f66c39..7cef8fb9 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -36,6 +36,7 @@ Listed in alphabetical order. Name Github Twitter ========================== ============================ ============== a7p `@a7p`_ + Aaron Eikenberry `@aeikenberry` Adam Bogdał `@bogdal`_ Adam Dobrawy `@ad-m`_ Agam Dua @@ -85,6 +86,7 @@ Listed in alphabetical order. Mathijs Hoogland `@MathijsHoogland`_ Matt Linares Matt Warren `@mfwarren`_ + Matt Menzenski `@menzenski` mozillazg `@mozillazg`_ Pablo `@oubiga`_ Raphael Pierzina `@hackebrot`_ From ec0062dd752297b7fbcaae5f3e5accd87efcf781 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:45:47 +0100 Subject: [PATCH 065/526] add changes to changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd8751cd..304b3e14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-03-08] +### Changed +- Docker configuration now uses docker-compose format v2 (@aeikenberry) +- Make sure that STATIC_URL != MEDIA_URL (@cdvv7788) +- fix minor typos in project README (@menzenski) +- Updated docker docs (@jayfk) + +### Added +- Added database controls for docker (@jayfk) + + ## [2016-03-05] ### Changed - Update version of Django, celery, django-test-plus (@luzfcb) From 9a4c1497652960ae824355f1ae792123b7fd1d0a Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Tue, 8 Mar 2016 10:48:31 +0100 Subject: [PATCH 066/526] adds postgres backup controls to production config --- {{cookiecutter.repo_name}}/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/docker-compose.yml b/{{cookiecutter.repo_name}}/docker-compose.yml index 20fad0b7..798cb232 100644 --- a/{{cookiecutter.repo_name}}/docker-compose.yml +++ b/{{cookiecutter.repo_name}}/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: postgres: - image: postgres:9.5 + build: ./compose/postgres volumes: - /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data - /data/{{cookiecutter.repo_name}}/postgres-backups:/backups From 4567ef60f19e568b0e2ffc43606035c983da1b2d Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Mon, 14 Mar 2016 09:22:04 +0530 Subject: [PATCH 067/526] Add @ChrisPappalardo to list of contributors, update changelog --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.rst | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 304b3e14..7f2e2ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2016-03-14] +### Changed +- Enforce `repo_name` as proper python module (@ChrisPappalardo) + ## [2016-03-08] ### Changed - Docker configuration now uses docker-compose format v2 (@aeikenberry) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 7cef8fb9..553b7b8d 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -54,6 +54,7 @@ Listed in alphabetical order. Benjamin Abel Bouke Haarsma Burhan Khalid `@burhan`_ @burhan + Catherine Devlin `@catherinedevlin` Chris Curvey `@ccurvey`_ Chris Franklin Chris Franklin `@hairychris`_ @@ -118,6 +119,7 @@ Listed in alphabetical order. .. _@burhan: https://github.com/burhan .. _@ccurvey: https://github.com/ccurvey .. _@hairychris: https://github.com/hairychris +.. _@catherinedevlin: https://github.com/catherinedevlin .. _@ChrisPappalardo: https://github.com/ChrisPappalardo .. _@cdvv7788: https://github.com/cdvv7788 .. _@c-rhodes: https://github.com/c-rhodes From b589120b6508497947cb563d01b3405d163c7fc9 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Mon, 14 Mar 2016 09:30:00 +0530 Subject: [PATCH 068/526] Make sure all github handles have proper url --- CONTRIBUTORS.rst | 70 +++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 553b7b8d..f9d5fcea 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -36,7 +36,7 @@ Listed in alphabetical order. Name Github Twitter ========================== ============================ ============== a7p `@a7p`_ - Aaron Eikenberry `@aeikenberry` + Aaron Eikenberry `@aeikenberry`_ Adam Bogdał `@bogdal`_ Adam Dobrawy `@ad-m`_ Agam Dua @@ -54,12 +54,12 @@ Listed in alphabetical order. Benjamin Abel Bouke Haarsma Burhan Khalid `@burhan`_ @burhan - Catherine Devlin `@catherinedevlin` + Catherine Devlin `@catherinedevlin`_ Chris Curvey `@ccurvey`_ Chris Franklin Chris Franklin `@hairychris`_ Chris Pappalardo `@ChrisPappalardo`_ - Collederas `@Collederas` + Collederas `@Collederas`_ Cristian Vargas `@cdvv7788`_ Cullen Rhodes `@c-rhodes`_ Daniele Tricoli `@eriol`_ @@ -86,8 +86,8 @@ Listed in alphabetical order. Martin Blech Mathijs Hoogland `@MathijsHoogland`_ Matt Linares + Matt Menzenski `@menzenski`_ Matt Warren `@mfwarren`_ - Matt Menzenski `@menzenski` mozillazg `@mozillazg`_ Pablo `@oubiga`_ Raphael Pierzina `@hackebrot`_ @@ -104,53 +104,55 @@ Listed in alphabetical order. Yaroslav Halchenko ========================== ============================ ============== -.. _@areski: https://github.com/areski .. _@a7p: https://github.com/a7p -.. _@bogdal: https://github.com/bogdal .. _@ad-m: https://github.com/ad-m +.. _@aeikenberry: https://github.com/aeikenberry .. _@alb3rto: https://github.com/alb3rto -.. _@caffodian: https://github.com/caffodian -.. _@eraldo: https://github.com/eraldo -.. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza .. _@amjith: https://github.com/amjith -.. _@zcho: https://github.com/zcho -.. _@jazztpt: https://github.com/jazztpt -.. _@yunti: https://github.com/yunti +.. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza +.. _@areski: https://github.com/areski +.. _@arruda: https://github.com/arruda +.. _@bogdal: https://github.com/bogdal .. _@burhan: https://github.com/burhan -.. _@ccurvey: https://github.com/ccurvey -.. _@hairychris: https://github.com/hairychris -.. _@catherinedevlin: https://github.com/catherinedevlin -.. _@ChrisPappalardo: https://github.com/ChrisPappalardo -.. _@cdvv7788: https://github.com/cdvv7788 .. _@c-rhodes: https://github.com/c-rhodes +.. _@caffodian: https://github.com/caffodian +.. _@catherinedevlin: https://github.com/catherinedevlin +.. _@ccurvey: https://github.com/ccurvey +.. _@cdvv7788: https://github.com/cdvv7788 +.. _@ChrisPappalardo: https://github.com/ChrisPappalardo +.. _@Collederas: https://github.com/Collederas +.. _@ddiazpinto: https://github.com/ddiazpinto +.. _@eraldo: https://github.com/eraldo .. _@eriol: https://github.com/eriol .. _@eyadsibai: https://github.com/eyadsibai -.. _@arruda: https://github.com/arruda .. _@garry-cairns: https://github.com/garry-cairns .. _@garrypolley: https://github.com/garrypolley +.. _@hackebrot: https://github.com/hackebrot +.. _@hairychris: https://github.com/hairychris .. _@hjwp: https://github.com/hjwp -.. _@ikkebr: https://github.com/ikkebr .. _@IanLee1521: https://github.com/IanLee1521 -.. _@juliocc: https://github.com/juliocc -.. _@kaidokert: https://github.com/kaidokert -.. _@ka7eh: https://github.com/ka7eh -.. _@kevgathuku: https://github.com/kevgathuku +.. _@ikkebr: https://github.com/ikkebr .. _@iynaix: https://github.com/iynaix +.. _@jazztpt: https://github.com/jazztpt +.. _@juliocc: https://github.com/juliocc +.. _@jvanbrug: https://github.com/jvanbrug +.. _@ka7eh: https://github.com/ka7eh +.. _@kaidokert: https://github.com/kaidokert +.. _@kevgathuku: https://github.com/kevgathuku +.. _@knitatoms: https://github.com/knitatoms .. _@MathijsHoogland: https://github.com/MathijsHoogland +.. _@menzenski: https://github.com/menzenski .. _@mfwarren: https://github.com/mfwarren .. _@mozillazg: https://github.com/mozillazg -.. _@oubiga: https://github.com/oubiga -.. _@hackebrot: https://github.com/hackebrot -.. _@siauPatrick: https://github.com/siauPatrick -.. _@stepmr: https://github.com/stepmr -.. _@slafs: https://github.com/slafs -.. _@show0k: https://github.com/show0k -.. _@knitatoms: https://github.com/knitatoms -.. _@Travistock: https://github.com/Tavistock -.. _@jvanbrug: https://github.com/jvanbrug -.. _@ddiazpinto: https://github.com/ddiazpinto -.. _@Collederas: https://github.com/Collederas .. _@originell: https://github.com/originell +.. _@oubiga: https://github.com/oubiga +.. _@show0k: https://github.com/show0k +.. _@siauPatrick: https://github.com/siauPatrick +.. _@slafs: https://github.com/slafs +.. _@stepmr: https://github.com/stepmr +.. _@Travistock: https://github.com/Tavistock +.. _@yunti: https://github.com/yunti +.. _@zcho: https://github.com/zcho Special Thanks ~~~~~~~~~~~~~~ From eca82b5aff01ec3bf479ebbe713668a579cc6bdf Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Mon, 14 Mar 2016 09:36:29 +0530 Subject: [PATCH 069/526] fix(contributors): fix wrong attribution for @catherinedevlin --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f2e2ebb..0ad3e2ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2016-03-14] ### Changed -- Enforce `repo_name` as proper python module (@ChrisPappalardo) +- Enforce `repo_name` as proper python module (@catherinedevlin) ## [2016-03-08] ### Changed From 0a33611c30e3b2dfab7933244ebefe05d858e299 Mon Sep 17 00:00:00 2001 From: calculuscowboy Date: Wed, 16 Mar 2016 12:06:48 -0400 Subject: [PATCH 070/526] Add POSTGRES_USER environment variable to django service. --- {{cookiecutter.repo_name}}/dev.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.repo_name}}/dev.yml b/{{cookiecutter.repo_name}}/dev.yml index 7672e785..b48f53c8 100644 --- a/{{cookiecutter.repo_name}}/dev.yml +++ b/{{cookiecutter.repo_name}}/dev.yml @@ -17,6 +17,8 @@ services: command: python /app/manage.py runserver_plus 0.0.0.0:8000 depends_on: - postgres + environment: + - POSTGRES_USER={{cookiecutter.repo_name}} volumes: - .:/app ports: From 572de6965870db4d9f09f0b61c7e21b8bc36a57d Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Wed, 16 Mar 2016 20:26:01 +0100 Subject: [PATCH 071/526] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad3e2ce..ff82dadf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### [2016-03-16] +### Changed +- Set the correct postgres username in dev.yml (@calculuscowboy) + ## [2016-03-14] ### Changed - Enforce `repo_name` as proper python module (@catherinedevlin) From 3f7f8a386889b9989156435cc530d685adecb62a Mon Sep 17 00:00:00 2001 From: Roman Osipenko Date: Wed, 23 Mar 2016 13:16:12 +0200 Subject: [PATCH 072/526] Update LICENSE Fix condition check in LICENSE file, which prevent cookiecutter to generate this file. --- {{cookiecutter.repo_name}}/LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/LICENSE b/{{cookiecutter.repo_name}}/LICENSE index 0380bee5..e6d8e810 100644 --- a/{{cookiecutter.repo_name}}/LICENSE +++ b/{{cookiecutter.repo_name}}/LICENSE @@ -7,7 +7,7 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -{% elif cookiecutter.license == 'BSD' %} +{% elif cookiecutter.open_source_license == 'BSD' %} Copyright (c) {{ cookiecutter.year }}, {{ cookiecutter.author_name }} All rights reserved. @@ -35,4 +35,4 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -{% endif %} \ No newline at end of file +{% endif %} From 1616332af683f96304adb50f6f7dedac6d23ad20 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Wed, 23 Mar 2016 09:18:31 -0300 Subject: [PATCH 073/526] add @romanosipenko to CONTRIBUTORS list. Update changelog --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.rst | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff82dadf..fa105ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### [2016-03-23] +### Changed +- Fixed issue on LICENSE file generation (@romanosipenko) + ### [2016-03-16] ### Changed - Set the correct postgres username in dev.yml (@calculuscowboy) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index f9d5fcea..7a6e14f9 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -92,6 +92,7 @@ Listed in alphabetical order. Pablo `@oubiga`_ Raphael Pierzina `@hackebrot`_ Roman Afanaskin `@siauPatrick`_ + Roman Osipenko `@romanosipenko`_ Russell Davies stepmr `@stepmr`_ Sławek Ehlert `@slafs`_ @@ -146,6 +147,7 @@ Listed in alphabetical order. .. _@mozillazg: https://github.com/mozillazg .. _@originell: https://github.com/originell .. _@oubiga: https://github.com/oubiga +.. _@romanosipenko: https://github.com/romanosipenko .. _@show0k: https://github.com/show0k .. _@siauPatrick: https://github.com/siauPatrick .. _@slafs: https://github.com/slafs From da6ba57f053e1bc837dbfe46beaf63a7f194c6e6 Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Wed, 23 Mar 2016 18:51:25 +0100 Subject: [PATCH 074/526] use_pycharm variable, post_gen_project hook, {{ cookiecutter.repo_name }}/static marked as webResources --- cookiecutter.json | 1 + hooks/post_gen_project.py | 16 ++++++++++++++-- {{cookiecutter.repo_name}}/.gitignore | 2 ++ .../.idea/webResources.xml | 14 ++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 {{cookiecutter.repo_name}}/.idea/webResources.xml diff --git a/cookiecutter.json b/cookiecutter.json index 28d31fe3..9e75f14b 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -15,6 +15,7 @@ "use_sentry": "n", "use_newrelic": "n", "use_opbeat": "n", + "use_pycharm": "n", "windows": "n", "use_python2": "n", "open_source_license": ["MIT", "BSD", "Not open source"] diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 107d6f98..28f57876 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -3,7 +3,8 @@ Does the following: 1. Generates and saves random secret key 2. Removes the taskapp if celery isn't going to be used -3. Copy files from /docs/ to {{ cookiecutter.repo_name }}/docs/ +3. Removes the .idea directory if PyCharm isn't going to be used +4. Copy files from /docs/ to {{ cookiecutter.repo_name }}/docs/ TODO: this might have to be moved to a pre_gen_hook @@ -100,6 +101,13 @@ def remove_task_app(project_directory): ) shutil.rmtree(task_app_location) + +def remove_pycharm_dir(project_directory): + """Removes the .idea directory if PyCharm isn't going to be used""" + idea_dir_location = os.path.join(PROJECT_DIRECTORY, '.idea/') + shutil.rmtree(idea_dir_location) + + # IN PROGRESS # def copy_doc_files(project_directory): # cookiecutters_dir = DEFAULT_CONFIG['cookiecutters_dir'] @@ -125,5 +133,9 @@ make_secret_key(PROJECT_DIRECTORY) if '{{ cookiecutter.use_celery }}'.lower() == 'n': remove_task_app(PROJECT_DIRECTORY) -# 3. Copy files from /docs/ to {{ cookiecutter.repo_name }}/docs/ +# 3. Removes the .idea directory if PyCharm isn't going to be used +if '{{ cookiecutter.use_pycharm }}'.lower() != 'y': + remove_pycharm_dir(PROJECT_DIRECTORY) + +# 4. Copy files from /docs/ to {{ cookiecutter.repo_name }}/docs/ # copy_doc_files(PROJECT_DIRECTORY) diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore index 4b288b5b..e1c4d42e 100644 --- a/{{cookiecutter.repo_name}}/.gitignore +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -37,8 +37,10 @@ htmlcov *.mo *.pot +{% if cookiecutter.use_pycharm == 'y' %} # Pycharm .idea +{% endif %} # Vim diff --git a/{{cookiecutter.repo_name}}/.idea/webResources.xml b/{{cookiecutter.repo_name}}/.idea/webResources.xml new file mode 100644 index 00000000..e0fc860f --- /dev/null +++ b/{{cookiecutter.repo_name}}/.idea/webResources.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + From 58373e44f9623c605252983c3e5a95b14411d64f Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Wed, 23 Mar 2016 19:21:43 +0100 Subject: [PATCH 075/526] Django Support Enabled by default (Settings > Language & Frameworks > Django --- .../.idea/{{cookiecutter.repo_name}}.iml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 {{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml diff --git a/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml b/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml new file mode 100644 index 00000000..9b704c56 --- /dev/null +++ b/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml @@ -0,0 +1,13 @@ + + + + + + + + + From 60593a2cbb1242a7bc1e40c73d06bb726a858220 Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Wed, 23 Mar 2016 19:30:39 +0100 Subject: [PATCH 076/526] Default Python Template Language set to Django instead of Jinja2 Settings > Languages & Frameworks > Python Template Language --- .../.idea/{{cookiecutter.repo_name}}.iml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml b/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml index 9b704c56..c715debb 100644 --- a/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml +++ b/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml @@ -10,4 +10,12 @@ + + + From 66e8dc1de77547f8bb0537c6a4c14cc6fabb68a4 Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Wed, 23 Mar 2016 20:14:56 +0100 Subject: [PATCH 077/526] node_modules marked as excluded directory --- .idea/vcs.xml | 6 ++++++ .../.idea/{{cookiecutter.repo_name}}.iml | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml b/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml index c715debb..216ce561 100644 --- a/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml +++ b/{{cookiecutter.repo_name}}/.idea/{{cookiecutter.repo_name}}.iml @@ -10,6 +10,11 @@ + + + + + + +