From b275c7ca72687d4fb4a2a2d72b1d1b1ffa23446b Mon Sep 17 00:00:00 2001 From: kaidokert Date: Mon, 20 Jul 2015 02:10:31 +0100 Subject: [PATCH 001/402] Add .pep8 and .pylintrc --- {{cookiecutter.repo_name}}/.pep8 | 3 +++ {{cookiecutter.repo_name}}/.pylintrc | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 {{cookiecutter.repo_name}}/.pep8 create mode 100644 {{cookiecutter.repo_name}}/.pylintrc diff --git a/{{cookiecutter.repo_name}}/.pep8 b/{{cookiecutter.repo_name}}/.pep8 new file mode 100644 index 000000000..5c558cdd6 --- /dev/null +++ b/{{cookiecutter.repo_name}}/.pep8 @@ -0,0 +1,3 @@ +[pep8] +max-line-length = 120 +exclude=*/migrations/* diff --git a/{{cookiecutter.repo_name}}/.pylintrc b/{{cookiecutter.repo_name}}/.pylintrc new file mode 100644 index 000000000..ce2204c9d --- /dev/null +++ b/{{cookiecutter.repo_name}}/.pylintrc @@ -0,0 +1,11 @@ +[MASTER] +load-plugins=pylint_common, pylint_django{% if cookiecutter.use_celery == "y" %}, pylint_celery {% endif %} + +[FORMAT] +max-line-length=120 + +[MESSAGES CONTROL] +disable=missing-docstring,invalid-name + +[DESIGN] +max-parents=13 \ No newline at end of file From 362f86a4c11aa8c67107a0a6c5f3bcaf976bcecc Mon Sep 17 00:00:00 2001 From: kaido Date: Sun, 19 Jul 2015 21:55:29 -0700 Subject: [PATCH 002/402] Switch celery default serialization to JSON, to avoid pickle related deprecation warnings --- {{cookiecutter.repo_name}}/config/settings/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/common.py b/{{cookiecutter.repo_name}}/config/settings/common.py index 22d3d0849..cc6faece5 100644 --- a/{{cookiecutter.repo_name}}/config/settings/common.py +++ b/{{cookiecutter.repo_name}}/config/settings/common.py @@ -256,11 +256,14 @@ LOGGING = { } } {% if cookiecutter.use_celery == "y" %} -########## CELERY +# ######### CELERY INSTALLED_APPS += ('{{cookiecutter.repo_name}}.taskapp.celery.CeleryConfig',) # if you are not using the django database broker (e.g. rabbitmq, redis, memcached), you can remove the next line. INSTALLED_APPS += ('kombu.transport.django',) BROKER_URL = env("CELERY_BROKER_URL", default='django://') -########## END CELERY +CELERY_ACCEPT_CONTENT = ['json'] +CELERY_TASK_SERIALIZER = 'json' +CELERY_RESULT_SERIALIZER = 'json' +# ######### END CELERY {% endif %} # Your common stuff: Below this line define 3rd party library settings From 76a207d8dae65ed67ac59889d968b7841e11f260 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Thu, 6 Aug 2015 11:21:08 -0700 Subject: [PATCH 003/402] Oops - revert celery defaults change, separate PR --- {{cookiecutter.repo_name}}/config/settings/common.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/common.py b/{{cookiecutter.repo_name}}/config/settings/common.py index cc6faece5..22d3d0849 100644 --- a/{{cookiecutter.repo_name}}/config/settings/common.py +++ b/{{cookiecutter.repo_name}}/config/settings/common.py @@ -256,14 +256,11 @@ LOGGING = { } } {% if cookiecutter.use_celery == "y" %} -# ######### CELERY +########## CELERY INSTALLED_APPS += ('{{cookiecutter.repo_name}}.taskapp.celery.CeleryConfig',) # if you are not using the django database broker (e.g. rabbitmq, redis, memcached), you can remove the next line. INSTALLED_APPS += ('kombu.transport.django',) BROKER_URL = env("CELERY_BROKER_URL", default='django://') -CELERY_ACCEPT_CONTENT = ['json'] -CELERY_TASK_SERIALIZER = 'json' -CELERY_RESULT_SERIALIZER = 'json' -# ######### END CELERY +########## END CELERY {% endif %} # Your common stuff: Below this line define 3rd party library settings From 2bf111d03a89894ee59d9c0e02db7373df7c5908 Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Thu, 27 Aug 2015 20:18:10 -0700 Subject: [PATCH 004/402] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e3696890..f92c458de 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/). +## [2015-08-27] +### Changed +- Grunt Updates: use libsass, add postcss (@288) + ## [2015-08-20] ### Changed - requirements files to match current dependency versions (@pydanny) From cb4e1d0d9ddd7bb439a2631e11bea9e5a2105f1d Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 28 Aug 2015 22:01:26 -0700 Subject: [PATCH 005/402] Switch to django-mailgun-redux --- CHANGELOG.md | 6 ++++++ {{cookiecutter.repo_name}}/requirements/production.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f92c458de..8716369a8 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/). + +## [2015-08-28] +### Changed +- Switched to django-mailgun-redux so mail doesn't blow up on Python 3 (@pydanny) + + ## [2015-08-27] ### Changed - Grunt Updates: use libsass, add postcss (@288) diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index 73d66d190..9910b5e96 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -17,7 +17,7 @@ Collectfast==0.2.3 # Mailgun Support # --------------- -django-mailgun==0.2.2 +django-mailgun-redux==0.3.0 {% if cookiecutter.use_sentry == "y" -%} # Raven is the Sentry client From 8330706775bb6c996db6252e5874bd39421d1e96 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Sat, 29 Aug 2015 12:09:45 -0700 Subject: [PATCH 006/402] Update navbar and toggle to Bootstrap 4 HTML. --- .../templates/base.html | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index f4732389e..0d25e405a 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -34,38 +34,32 @@ - {% endblock %} -{% endraw %} \ No newline at end of file +{% endraw %} diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/verified_email_required.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/verified_email_required.html index f6355fb63..7d071c6a6 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/verified_email_required.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/verified_email_required.html @@ -1,6 +1,5 @@ {% raw %}{% extends "account/base.html" %} -{% load url from future %} {% load i18n %} {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} @@ -26,4 +25,4 @@ {% endblock %} -{% endraw %} \ No newline at end of file +{% endraw %} From 5214d6ca658f04738cad22839be509227d0cc947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 12 Nov 2015 17:33:42 -0300 Subject: [PATCH 232/402] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cc287374..b77b46c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Update version of django-allauth (@yunti) +### Removed +- remove ```{% load url from future %}``` in templates - deprecated in django 1.9 (@yunti) + ## [2015-11-11] ### Added - Added django_coverage_plugin to measure Django template coverage (@audreyr) From 782f93c68e5567c4c0e9409040f800f925247d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 12 Nov 2015 17:39:30 -0300 Subject: [PATCH 233/402] add Cristian Vargas in CONTRIBUTORS list --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 7c4f20f1a..8505d2559 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -63,6 +63,7 @@ Code Contributors * Amjith Ramanujam / @amjith * Garry Polley / @garrypolley * Théo Segonds / show0k +* Cristian Vargas / @cdvv7788 \* Possesses commit rights From da956975e757e2f06c7a3e5478fdfec2aa01ca93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 12 Nov 2015 17:42:34 -0300 Subject: [PATCH 234/402] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b77b46c82..bfe913a94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-12] ### Changed - Update version of django-allauth (@yunti) +- Added a warning in README.rst: ```repo_name must be a valid Python module``` @cdvv7788 ### Removed - remove ```{% load url from future %}``` in templates - deprecated in django 1.9 (@yunti) From c86d5c928cdefd09aca102b2a5c37f662e1426a6 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Sat, 14 Nov 2015 14:15:00 +0100 Subject: [PATCH 235/402] Fix typo & import in UserFactory --- .../{{cookiecutter.repo_name}}/users/tests/factories.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/tests/factories.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/tests/factories.py index e36ba8f77..e2c967de7 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/tests/factories.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/tests/factories.py @@ -1,12 +1,11 @@ -from feder.users import models import factory class UserFactory(factory.django.DjangoModelFactory): username = factory.Sequence(lambda n: 'user-{0}'.format(n)) email = factory.Sequence(lambda n: 'user-{0}@example.com'.format(n)) - password = factory.PosteGnerationMethodCall('set_password', 'password') + password = factory.PostGenerationMethodCall('set_password', 'password') class Meta: - model = models.User + model = 'users.User' django_get_or_create = ('username', ) From 9920c6d5b9559536e407abadd392443dff75962e Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 14:20:19 +0300 Subject: [PATCH 236/402] upstream merge --- README.rst | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 3a607447c..a61530686 100644 --- a/README.rst +++ b/README.rst @@ -32,14 +32,20 @@ Features * Grunt build for compass and livereload * Basic e-mail configurations for sending emails via Mailgun_ * Media storage using Amazon S3 -* Serve static files from Amazon S3 or Whitenoise_ (optional) -* Pre configured Celery_ (optional) -* Integration with Maildump_ for local email testing (optional) -* Integration with Sentry_ for error logging (optional) -* Integration with NewRelic_ for performance monitoring (optional) -* Docker support using docker-compose_ for dev and prod +* Docker support using docker-compose_ for development and production * Procfile_ for deploying to Heroku +Optional Integrations +--------------------- + +*These features can be enabled during initial project setup.* + +* Serve static files from Amazon S3 or Whitenoise_ +* Configuration for Celery_ +* Integration with Maildump_ for local email testing +* Integration with Sentry_ for error logging +* Integration with NewRelic_ for performance monitoring + .. _alpha: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ .. _Hitch: https://github.com/hitchtest/hitchtest .. _Bootstrap: https://github.com/twbs/bootstrap From 9c28c8e0df4a3e7d35cda2d72b1b04673297c96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 16 Nov 2015 08:36:51 -0300 Subject: [PATCH 237/402] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfe913a94..ce3628867 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/). +## [2015-11-16] +### Changed +- Cleanup of main README (@burhan) + +## [2015-11-15] +### Added +- Added `UserFactory` for users.User tests (@ad-m) + ## [2015-11-12] ### Changed - Update version of django-allauth (@yunti) From 005dd8c29664594ad789680e3262eac464747c59 Mon Sep 17 00:00:00 2001 From: Tom Atkins Date: Mon, 16 Nov 2015 11:45:29 +0000 Subject: [PATCH 238/402] Replace Maildump with MailHog --- README.rst | 22 ++++++++++++------- cookiecutter.json | 2 +- docs/developing-locally.rst | 11 ++++++++-- docs/project-generation-options.rst | 10 ++++----- tests/test_cookiecutter_generation.py | 2 +- {{cookiecutter.repo_name}}/Gruntfile.js | 20 +++++------------ {{cookiecutter.repo_name}}/README.rst | 21 ++++++++---------- .../config/settings/local.py | 2 +- .../requirements/local.txt | 12 ---------- 9 files changed, 46 insertions(+), 56 deletions(-) diff --git a/README.rst b/README.rst index 3a607447c..bf20b7119 100644 --- a/README.rst +++ b/README.rst @@ -32,14 +32,20 @@ Features * Grunt build for compass and livereload * Basic e-mail configurations for sending emails via Mailgun_ * Media storage using Amazon S3 -* Serve static files from Amazon S3 or Whitenoise_ (optional) -* Pre configured Celery_ (optional) -* Integration with Maildump_ for local email testing (optional) -* Integration with Sentry_ for error logging (optional) -* Integration with NewRelic_ for performance monitoring (optional) -* Docker support using docker-compose_ for dev and prod +* Docker support using docker-compose_ for development and production * Procfile_ for deploying to Heroku +Optional Integrations +--------------------- + +*These features can be enabled during initial project setup.* + +* Serve static files from Amazon S3 or Whitenoise_ +* Configuration for Celery_ +* Integration with MailHog_ for local email testing +* Integration with Sentry_ for error logging +* Integration with NewRelic_ for performance monitoring + .. _alpha: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ .. _Hitch: https://github.com/hitchtest/hitchtest .. _Bootstrap: https://github.com/twbs/bootstrap @@ -52,7 +58,7 @@ Features .. _Mailgun: https://mailgun.com/ .. _Whitenoise: https://whitenoise.readthedocs.org/ .. _Celery: http://www.celeryproject.org/ -.. _Maildump: https://github.com/ThiefMaster/maildump +.. _MailHog: https://github.com/mailhog/MailHog .. _Sentry: https://getsentry.com .. _NewRelic: https://newrelic.com .. _docker-compose: https://www.github.com/docker/compose @@ -107,7 +113,7 @@ It prompts you for questions. Answer them:: year [2015]: use_whitenoise [y]: n use_celery [n]: y - use_maildump [n]: n + use_mailhog [n]: n use_sentry [n]: y use_newrelic [n]: y windows [n]: n diff --git a/cookiecutter.json b/cookiecutter.json index 213c18422..c8b6deee9 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -11,7 +11,7 @@ "year": "{{ cookiecutter.now[:4] }}", "use_whitenoise": "y", "use_celery": "n", - "use_maildump": "n", + "use_mailhog": "n", "use_sentry": "n", "use_newrelic": "n", "windows": "n", diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index ae737dc4f..349c9120b 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -31,9 +31,16 @@ django-allauth sends an email to verify users (and superusers) after signup and .. _configure your email backend: http://docs.djangoproject.com/en/1.8/topics/email/#smtp-backend -In development you can (optionally) use Maildump_ for email testing. Or alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'`` +In development you can (optionally) use MailHog_ for email testing. MailHog is built with Go so there are no dependencies. To use MailHog:: -.. _Maildump: https://github.com/ThiefMaster/maildump +1. `Download the latest release`_ for your operating system +2. Rename the executable to ``mailhog`` and copy it to the root of your project directory +3. Make sure it is executable (e.g. ``chmod +x mailhog``) + +.. _Mailhog: https://github.com/mailhog/MailHog/ +.. _Download the latest release: https://github.com/mailhog/MailHog/releases + +Alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'`` In production basic email configuration is setup to send emails with Mailgun_ diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 2ed91bbbb..d879b8ff5 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -34,10 +34,10 @@ use_celery [n] Whether to use Celery_. This gives you the ability to use distributed task queues in your project. -use_maildump [n] - Whether to use Maildump_. Maildump is a tool that simulates email receiving - for development purposes. It runs a super simple SMTP server which catches - any message sent to it. Then messages are displayed in a web interface. +use_mailhog [n] + Whether to use MailHog_. MailHog is a tool that simulates email receiving + for development purposes. It runs a simple SMTP server which catches + any message sent to it. Messages are displayed in a web interface which runs at ``http://localhost:8025/`` You need to download the MailHog executable for your operating system, see the 'Developing Locally' docs for instructions. use_sentry [n] Whether to use Sentry_ to log errors from your project. @@ -51,5 +51,5 @@ use_python2 [n] .. _WhiteNoise: https://github.com/evansd/whitenoise .. _Celery: https://github.com/celery/celery -.. _Maildump: https://github.com/ThiefMaster/maildump +.. _MailHog: https://github.com/mailhog/MailHog .. _Sentry: https://github.com/getsentry/sentry diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 74f8947c6..0f982660f 100644 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -62,7 +62,7 @@ def test_default_configuration(cookies, context): check_paths(paths) -@pytest.fixture(params=['use_maildump', 'use_celery', 'windows']) +@pytest.fixture(params=['use_mailhog', 'use_celery', 'windows']) def feature_context(request, context): context.update({request.param: 'y'}) return context diff --git a/{{cookiecutter.repo_name}}/Gruntfile.js b/{{cookiecutter.repo_name}}/Gruntfile.js index b88b11725..1eaade285 100644 --- a/{{cookiecutter.repo_name}}/Gruntfile.js +++ b/{{cookiecutter.repo_name}}/Gruntfile.js @@ -22,7 +22,6 @@ module.exports = function (grunt) { images: this.app + '/static/images', js: this.app + '/static/js', manageScript: 'manage.py', - {% if cookiecutter.use_maildump=="y" -%}mailserverpid: 'mailserver.pid',{%- endif %} } }; @@ -79,7 +78,7 @@ module.exports = function (grunt) { }, } }, - + //see https://github.com/nDmitry/grunt-postcss postcss: { options: { @@ -113,16 +112,16 @@ module.exports = function (grunt) { runDjango: { cmd: 'python <%= paths.manageScript %> runserver' }, - {% if cookiecutter.use_maildump == "y" -%}runMailDump: { - cmd: 'maildump -p <%= paths.mailserverpid %>' - }, - stopMailDump: { - cmd: 'maildump -p <%= paths.mailserverpid %> --stop' + {% if cookiecutter.use_mailhog == "y" -%}runMailHog: { + cmd: './mailhog' },{%- endif %} } }); grunt.registerTask('serve', [ + {% if cookiecutter.use_mailhog == "y" -%} + 'bgShell:runMailHog', + {%- endif %} 'bgShell:runDjango', 'watch' ]); @@ -135,12 +134,5 @@ module.exports = function (grunt) { grunt.registerTask('default', [ 'build' ]); - {% if cookiecutter.use_maildump == "y" -%} - grunt.registerTask('start-email-server', [ - 'bgShell:runMailDump' - ]); - grunt.registerTask('stop-email-server', [ - 'bgShell:stopMailDump' - ]);{%- endif %} }; diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index ba7dc2165..cbbe32542 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -61,28 +61,25 @@ Please note: For Celerys import magic to work, it is important *where* the celer {% endif %} -{% if cookiecutter.use_maildump == "y" %} +{% if cookiecutter.use_mailhog == "y" %} Email Server ^^^^^^^^^^^^ -In development, it is often nice to be able to see emails that are being sent from your application. For this purpose, -a Grunt task exists to start an instance of `maildump`_ which is a local SMTP server with an online interface. +In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available. -.. _maildump: https://github.com/ThiefMaster/maildump +.. _mailhog: https://github.com/mailhog/MailHog -Make sure you have nodejs installed, and then type the following:: +To start the service, make sure you have nodejs installed, and then type the following:: - $ grunt start-email-server + $ npm install + $ grunt serve -This will start an email server. The project is setup to deliver to the email server by default. To view messages -that are sent by your application, open your browser to http://127.0.0.1:1080 +(After the first run you only need to type ``grunt serve``) This will start an email server that listens on ``127.0.0.1:1025`` in addition to starting your Django project and a watch task for live reload. -To stop the email server:: +To view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025`` - $ grunt stop-email-server - -The email server listens on 127.0.0.1:1025 +The email server will exit when you exit the Grunt task on the CLI with Ctrl+C. {% endif %} diff --git a/{{cookiecutter.repo_name}}/config/settings/local.py b/{{cookiecutter.repo_name}}/config/settings/local.py index cbe5d58db..256138832 100644 --- a/{{cookiecutter.repo_name}}/config/settings/local.py +++ b/{{cookiecutter.repo_name}}/config/settings/local.py @@ -25,7 +25,7 @@ SECRET_KEY = env("DJANGO_SECRET_KEY", default='CHANGEME!!!') # ------------------------------------------------------------------------------ EMAIL_HOST = 'localhost' EMAIL_PORT = 1025 -{%if cookiecutter.use_maildump == "n" -%} +{%if cookiecutter.use_mailhog == "n" -%} EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.console.EmailBackend') {%- endif %} diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index a9b63d442..04639e4f3 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -13,15 +13,3 @@ django-debug-toolbar==1.4 # improved REPL ipdb==0.8.1 - -{% if cookiecutter.use_maildump == "y" -%} -# Required by maildump. -{% if cookiecutter.use_python2 == 'n' -%} -# Need to pin dependency to gevent beta to be Python 3-compatible. -gevent==1.1b6 -{% else -%} -gevent==1.0.2 -{% endif -%} -# Enables better email testing -maildump==0.5.1 -{%- endif %} From 727281e99ada711d53639a9fdbb27312e0606027 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 18:55:37 +0300 Subject: [PATCH 239/402] initial configuration to support opbeat --- README.rst | 3 +++ cookiecutter.json | 1 + docs/settings.rst | 3 +++ .../config/settings/production.py | 18 +++++++++++++++++- .../requirements/production.txt | 6 ++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a61530686..f44db0931 100644 --- a/README.rst +++ b/README.rst @@ -45,6 +45,7 @@ Optional Integrations * Integration with Maildump_ for local email testing * Integration with Sentry_ for error logging * Integration with NewRelic_ for performance monitoring +* Integration with Opbeat_ for performance monitoring .. _alpha: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ .. _Hitch: https://github.com/hitchtest/hitchtest @@ -62,6 +63,7 @@ Optional Integrations .. _Sentry: https://getsentry.com .. _NewRelic: https://newrelic.com .. _docker-compose: https://www.github.com/docker/compose +.. _Opbeat: https://opbeat.com/ Constraints @@ -116,6 +118,7 @@ It prompts you for questions. Answer them:: use_maildump [n]: n use_sentry [n]: y use_newrelic [n]: y + use_obpeat [n]: y windows [n]: n use_python2 [n]: y diff --git a/cookiecutter.json b/cookiecutter.json index 213c18422..4367b8b1f 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -14,6 +14,7 @@ "use_maildump": "n", "use_sentry": "n", "use_newrelic": "n", + "use_opbeat": "n", "windows": "n", "use_python2": "n" } diff --git a/docs/settings.rst b/docs/settings.rst index 08a95bf09..bdd2075f3 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -41,4 +41,7 @@ DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error DJANGO_MAILGUN_SERVER_NAME MAILGUN_SERVER_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 +DJANGO_OPBEAT_ORGANIZATION_ID OPBEAT['ORGANIZATION_ID'] n/a raises error ======================================= =========================== ============================================== ====================================================================== diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index 27ba946e4..c065f6fca 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -9,6 +9,9 @@ Production Configurations {% if cookiecutter.use_sentry == "y" %} - Use sentry for error logging {% endif %} +{% if cookiecutter.use_opbeat == "y" %} +- Use opbeat for error reporting +{% endif %} ''' from __future__ import absolute_import, unicode_literals @@ -18,6 +21,7 @@ from django.utils import six import logging {% endif %} + from .common import * # noqa # SECRET CONFIGURATION @@ -52,7 +56,19 @@ MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + \ MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + MIDDLEWARE_CLASSES {%- endif %} - +{% if cookiecutter.use_opbeat == "y" -%} +# opbeat integration +# See https://opbeat.com/languages/django/ +INSTALLED_APPS += ('opbeat.contrib.django',) +OPBEAT = { + 'ORGANIZATION_ID': env('DJANGO_OPBEAT_ORGANIZATION_ID'), + 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), + 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') +} +MIDDLEWARE_CLASSES += ( + 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', +) +{%- endif %} # set this to 60 seconds and then to 518400 when you can prove it works SECURE_HSTS_SECONDS = 60 SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool( diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index 4a0939a0b..b64f3dd72 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -37,3 +37,9 @@ raven # ----------------------------------------- newrelic {%- endif %} + +{% if cookiecutter.use_opbeat == "y" -%} +# Opbeat agent for performance monitoring +# ----------------------------------------- +opbeat +{%- endif %} From a68f256e5b23424a323e0ef78a0660cecf52e4de Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 19:04:07 +0300 Subject: [PATCH 240/402] fixing the middleware order --- {{cookiecutter.repo_name}}/config/settings/production.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index c065f6fca..09d11ef37 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -65,9 +65,9 @@ OPBEAT = { 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') } -MIDDLEWARE_CLASSES += ( +MIDDLEWARE_CLASSES = ( 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', -) +) + MIDDLEWARE_CLASSES {%- endif %} # set this to 60 seconds and then to 518400 when you can prove it works SECURE_HSTS_SECONDS = 60 From 07ec413f98b14c055c05adcda5d283bd24ceeda8 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 19:20:15 +0300 Subject: [PATCH 241/402] E303 too many blank lines fix --- {{cookiecutter.repo_name}}/config/settings/production.py | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index 09d11ef37..be16818ae 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -21,7 +21,6 @@ from django.utils import six import logging {% endif %} - from .common import * # noqa # SECRET CONFIGURATION From b78b2ddf7356d5a18ee0d4969b4b98adf5501719 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 21:24:21 +0300 Subject: [PATCH 242/402] fixing error in settings --- docs/settings.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/settings.rst b/docs/settings.rst index 08a95bf09..78a4053a3 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -24,7 +24,7 @@ DJANGO_SESSION_COOKIE_SECURE SESSION_COOKIE_SECURE n/a DJANGO_DEFAULT_FROM_EMAIL DEFAULT_FROM_EMAIL n/a "your_project_name " DJANGO_SERVER_EMAIL SERVER_EMAIL n/a "your_project_name " DJANGO_EMAIL_SUBJECT_PREFIX EMAIL_SUBJECT_PREFIX n/a "[your_project_name] " -DJANGO_ALLOWED_HOSTS ALLOWED_HOSTS ['*'] ['your_project_name}'] +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: From 4c07b5dea68ab099cea68b8d04442d60b42f1c8f Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 18:55:37 +0300 Subject: [PATCH 243/402] initial configuration to support opbeat --- README.rst | 3 +++ cookiecutter.json | 1 + docs/settings.rst | 3 +++ .../config/settings/production.py | 18 +++++++++++++++++- .../requirements/production.txt | 6 ++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a61530686..f44db0931 100644 --- a/README.rst +++ b/README.rst @@ -45,6 +45,7 @@ Optional Integrations * Integration with Maildump_ for local email testing * Integration with Sentry_ for error logging * Integration with NewRelic_ for performance monitoring +* Integration with Opbeat_ for performance monitoring .. _alpha: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ .. _Hitch: https://github.com/hitchtest/hitchtest @@ -62,6 +63,7 @@ Optional Integrations .. _Sentry: https://getsentry.com .. _NewRelic: https://newrelic.com .. _docker-compose: https://www.github.com/docker/compose +.. _Opbeat: https://opbeat.com/ Constraints @@ -116,6 +118,7 @@ It prompts you for questions. Answer them:: use_maildump [n]: n use_sentry [n]: y use_newrelic [n]: y + use_obpeat [n]: y windows [n]: n use_python2 [n]: y diff --git a/cookiecutter.json b/cookiecutter.json index 213c18422..4367b8b1f 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -14,6 +14,7 @@ "use_maildump": "n", "use_sentry": "n", "use_newrelic": "n", + "use_opbeat": "n", "windows": "n", "use_python2": "n" } diff --git a/docs/settings.rst b/docs/settings.rst index 78a4053a3..629e60f43 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -41,4 +41,7 @@ DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error DJANGO_MAILGUN_SERVER_NAME MAILGUN_SERVER_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 +DJANGO_OPBEAT_ORGANIZATION_ID OPBEAT['ORGANIZATION_ID'] n/a raises error ======================================= =========================== ============================================== ====================================================================== diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index 27ba946e4..c065f6fca 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -9,6 +9,9 @@ Production Configurations {% if cookiecutter.use_sentry == "y" %} - Use sentry for error logging {% endif %} +{% if cookiecutter.use_opbeat == "y" %} +- Use opbeat for error reporting +{% endif %} ''' from __future__ import absolute_import, unicode_literals @@ -18,6 +21,7 @@ from django.utils import six import logging {% endif %} + from .common import * # noqa # SECRET CONFIGURATION @@ -52,7 +56,19 @@ MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + \ MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + MIDDLEWARE_CLASSES {%- endif %} - +{% if cookiecutter.use_opbeat == "y" -%} +# opbeat integration +# See https://opbeat.com/languages/django/ +INSTALLED_APPS += ('opbeat.contrib.django',) +OPBEAT = { + 'ORGANIZATION_ID': env('DJANGO_OPBEAT_ORGANIZATION_ID'), + 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), + 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') +} +MIDDLEWARE_CLASSES += ( + 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', +) +{%- endif %} # set this to 60 seconds and then to 518400 when you can prove it works SECURE_HSTS_SECONDS = 60 SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool( diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index 4a0939a0b..b64f3dd72 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -37,3 +37,9 @@ raven # ----------------------------------------- newrelic {%- endif %} + +{% if cookiecutter.use_opbeat == "y" -%} +# Opbeat agent for performance monitoring +# ----------------------------------------- +opbeat +{%- endif %} From f4a75e0d1070e12b2d7de01745da77244e776b61 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 19:04:07 +0300 Subject: [PATCH 244/402] fixing the middleware order --- {{cookiecutter.repo_name}}/config/settings/production.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index c065f6fca..09d11ef37 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -65,9 +65,9 @@ OPBEAT = { 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') } -MIDDLEWARE_CLASSES += ( +MIDDLEWARE_CLASSES = ( 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', -) +) + MIDDLEWARE_CLASSES {%- endif %} # set this to 60 seconds and then to 518400 when you can prove it works SECURE_HSTS_SECONDS = 60 From 03edea302172c84e806acc0b2cbea10edabedec2 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Mon, 16 Nov 2015 19:20:15 +0300 Subject: [PATCH 245/402] E303 too many blank lines fix --- {{cookiecutter.repo_name}}/config/settings/production.py | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index 09d11ef37..be16818ae 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -21,7 +21,6 @@ from django.utils import six import logging {% endif %} - from .common import * # noqa # SECRET CONFIGURATION From e4f922763fd5a26f96b0b522e2ae148095f1684a Mon Sep 17 00:00:00 2001 From: Tom Atkins Date: Mon, 16 Nov 2015 19:17:03 +0000 Subject: [PATCH 246/402] Add mailhog binary to gitignore --- {{cookiecutter.repo_name}}/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore index 796c7be37..73881c8c7 100644 --- a/{{cookiecutter.repo_name}}/.gitignore +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -61,3 +61,6 @@ node_modules/ # Hitch directory tests/.hitch + +# MailHog binary +mailhog From e2c700da5cb50d63ff6c969db3fb901b1d014758 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Tue, 17 Nov 2015 10:27:58 +0300 Subject: [PATCH 247/402] updating env.example --- {{cookiecutter.repo_name}}/env.example | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.repo_name}}/env.example b/{{cookiecutter.repo_name}}/env.example index 3420db7cb..edc5454bf 100644 --- a/{{cookiecutter.repo_name}}/env.example +++ b/{{cookiecutter.repo_name}}/env.example @@ -18,3 +18,8 @@ DJANGO_SENTRY_DSN= {% if cookiecutter.use_newrelic == 'y' -%} NEW_RELIC_LICENSE_KEY {% endif %} +{% if cookiecutter.use_opbeat == 'y' -%} +DJANGO_OPBEAT_ORGANIZATION_ID +DJANGO_OPBEAT_APP_ID +DJANGO_OPBEAT_SECRET_TOKEN +{% endif %} From d69a6f020b1aadace27ac49152f03fb70e44bc12 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Tue, 17 Nov 2015 16:58:00 -0800 Subject: [PATCH 248/402] Update changelog for @burhan --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfe913a94..2cd9349f4 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/). +## [2015-11-17] +### Added +- initial configuration to support opbeat (@burhan) + ## [2015-11-12] ### Changed - Update version of django-allauth (@yunti) From f45b81b7a0c0a40ddcc4b66652cf45d2880d0ec0 Mon Sep 17 00:00:00 2001 From: Taylor Edmiston Date: Tue, 17 Nov 2015 22:54:29 -0500 Subject: [PATCH 249/402] Fix typo in readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f44db0931..407cf4114 100644 --- a/README.rst +++ b/README.rst @@ -118,7 +118,7 @@ It prompts you for questions. Answer them:: use_maildump [n]: n use_sentry [n]: y use_newrelic [n]: y - use_obpeat [n]: y + use_opbeat [n]: y windows [n]: n use_python2 [n]: y From 840f4a7d4c7143ae2f8d46be8cbb274fc8c7c3bc Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Tue, 17 Nov 2015 21:05:28 -0800 Subject: [PATCH 250/402] *.pyc is already covered by *.py[cod] No need to include it separately. --- {{cookiecutter.repo_name}}/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore index 796c7be37..0757b98b5 100644 --- a/{{cookiecutter.repo_name}}/.gitignore +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -21,7 +21,6 @@ sftp-config.json # Basics *.py[cod] -*.pyc __pycache__ # Logs From 7eb0fc0e816545c9eae8d953e54d9ac738d2a1dc Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Tue, 17 Nov 2015 21:07:14 -0800 Subject: [PATCH 251/402] Add pyc fix to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfb9c09fc..70b4d8169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-17] ### Added - initial configuration to support opbeat (@burhan) +### Removed +- Took *.pyc out of .gitignore, because it's already covered by *.py[cod] (@audreyr) ## [2015-11-16] ### Changed From 3316a3b02398ccf4f7430738af0b7b7c471525ae Mon Sep 17 00:00:00 2001 From: Tom Atkins Date: Wed, 18 Nov 2015 11:16:25 +0000 Subject: [PATCH 252/402] Fix merge conflict in README.rst --- README.rst | 6 +++--- cookiecutter.json | 2 +- docs/developing-locally.rst | 11 ++++++++-- docs/project-generation-options.rst | 10 ++++----- tests/test_cookiecutter_generation.py | 2 +- {{cookiecutter.repo_name}}/Gruntfile.js | 20 ++++++------------ {{cookiecutter.repo_name}}/README.rst | 21 ++++++++----------- .../config/settings/local.py | 2 +- .../requirements/local.txt | 12 ----------- 9 files changed, 35 insertions(+), 51 deletions(-) diff --git a/README.rst b/README.rst index f44db0931..aa15e89ea 100644 --- a/README.rst +++ b/README.rst @@ -42,7 +42,7 @@ Optional Integrations * Serve static files from Amazon S3 or Whitenoise_ * Configuration for Celery_ -* Integration with Maildump_ for local email testing +* Integration with MailHog_ for local email testing * Integration with Sentry_ for error logging * Integration with NewRelic_ for performance monitoring * Integration with Opbeat_ for performance monitoring @@ -59,7 +59,7 @@ Optional Integrations .. _Mailgun: https://mailgun.com/ .. _Whitenoise: https://whitenoise.readthedocs.org/ .. _Celery: http://www.celeryproject.org/ -.. _Maildump: https://github.com/ThiefMaster/maildump +.. _MailHog: https://github.com/mailhog/MailHog .. _Sentry: https://getsentry.com .. _NewRelic: https://newrelic.com .. _docker-compose: https://www.github.com/docker/compose @@ -115,7 +115,7 @@ It prompts you for questions. Answer them:: year [2015]: use_whitenoise [y]: n use_celery [n]: y - use_maildump [n]: n + use_mailhog [n]: n use_sentry [n]: y use_newrelic [n]: y use_obpeat [n]: y diff --git a/cookiecutter.json b/cookiecutter.json index 4367b8b1f..162d6b381 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -11,7 +11,7 @@ "year": "{{ cookiecutter.now[:4] }}", "use_whitenoise": "y", "use_celery": "n", - "use_maildump": "n", + "use_mailhog": "n", "use_sentry": "n", "use_newrelic": "n", "use_opbeat": "n", diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index ae737dc4f..349c9120b 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -31,9 +31,16 @@ django-allauth sends an email to verify users (and superusers) after signup and .. _configure your email backend: http://docs.djangoproject.com/en/1.8/topics/email/#smtp-backend -In development you can (optionally) use Maildump_ for email testing. Or alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'`` +In development you can (optionally) use MailHog_ for email testing. MailHog is built with Go so there are no dependencies. To use MailHog:: -.. _Maildump: https://github.com/ThiefMaster/maildump +1. `Download the latest release`_ for your operating system +2. Rename the executable to ``mailhog`` and copy it to the root of your project directory +3. Make sure it is executable (e.g. ``chmod +x mailhog``) + +.. _Mailhog: https://github.com/mailhog/MailHog/ +.. _Download the latest release: https://github.com/mailhog/MailHog/releases + +Alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'`` In production basic email configuration is setup to send emails with Mailgun_ diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 2ed91bbbb..d879b8ff5 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -34,10 +34,10 @@ use_celery [n] Whether to use Celery_. This gives you the ability to use distributed task queues in your project. -use_maildump [n] - Whether to use Maildump_. Maildump is a tool that simulates email receiving - for development purposes. It runs a super simple SMTP server which catches - any message sent to it. Then messages are displayed in a web interface. +use_mailhog [n] + Whether to use MailHog_. MailHog is a tool that simulates email receiving + for development purposes. It runs a simple SMTP server which catches + any message sent to it. Messages are displayed in a web interface which runs at ``http://localhost:8025/`` You need to download the MailHog executable for your operating system, see the 'Developing Locally' docs for instructions. use_sentry [n] Whether to use Sentry_ to log errors from your project. @@ -51,5 +51,5 @@ use_python2 [n] .. _WhiteNoise: https://github.com/evansd/whitenoise .. _Celery: https://github.com/celery/celery -.. _Maildump: https://github.com/ThiefMaster/maildump +.. _MailHog: https://github.com/mailhog/MailHog .. _Sentry: https://github.com/getsentry/sentry diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 74f8947c6..0f982660f 100644 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -62,7 +62,7 @@ def test_default_configuration(cookies, context): check_paths(paths) -@pytest.fixture(params=['use_maildump', 'use_celery', 'windows']) +@pytest.fixture(params=['use_mailhog', 'use_celery', 'windows']) def feature_context(request, context): context.update({request.param: 'y'}) return context diff --git a/{{cookiecutter.repo_name}}/Gruntfile.js b/{{cookiecutter.repo_name}}/Gruntfile.js index b88b11725..1eaade285 100644 --- a/{{cookiecutter.repo_name}}/Gruntfile.js +++ b/{{cookiecutter.repo_name}}/Gruntfile.js @@ -22,7 +22,6 @@ module.exports = function (grunt) { images: this.app + '/static/images', js: this.app + '/static/js', manageScript: 'manage.py', - {% if cookiecutter.use_maildump=="y" -%}mailserverpid: 'mailserver.pid',{%- endif %} } }; @@ -79,7 +78,7 @@ module.exports = function (grunt) { }, } }, - + //see https://github.com/nDmitry/grunt-postcss postcss: { options: { @@ -113,16 +112,16 @@ module.exports = function (grunt) { runDjango: { cmd: 'python <%= paths.manageScript %> runserver' }, - {% if cookiecutter.use_maildump == "y" -%}runMailDump: { - cmd: 'maildump -p <%= paths.mailserverpid %>' - }, - stopMailDump: { - cmd: 'maildump -p <%= paths.mailserverpid %> --stop' + {% if cookiecutter.use_mailhog == "y" -%}runMailHog: { + cmd: './mailhog' },{%- endif %} } }); grunt.registerTask('serve', [ + {% if cookiecutter.use_mailhog == "y" -%} + 'bgShell:runMailHog', + {%- endif %} 'bgShell:runDjango', 'watch' ]); @@ -135,12 +134,5 @@ module.exports = function (grunt) { grunt.registerTask('default', [ 'build' ]); - {% if cookiecutter.use_maildump == "y" -%} - grunt.registerTask('start-email-server', [ - 'bgShell:runMailDump' - ]); - grunt.registerTask('stop-email-server', [ - 'bgShell:stopMailDump' - ]);{%- endif %} }; diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index ba7dc2165..cbbe32542 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -61,28 +61,25 @@ Please note: For Celerys import magic to work, it is important *where* the celer {% endif %} -{% if cookiecutter.use_maildump == "y" %} +{% if cookiecutter.use_mailhog == "y" %} Email Server ^^^^^^^^^^^^ -In development, it is often nice to be able to see emails that are being sent from your application. For this purpose, -a Grunt task exists to start an instance of `maildump`_ which is a local SMTP server with an online interface. +In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available. -.. _maildump: https://github.com/ThiefMaster/maildump +.. _mailhog: https://github.com/mailhog/MailHog -Make sure you have nodejs installed, and then type the following:: +To start the service, make sure you have nodejs installed, and then type the following:: - $ grunt start-email-server + $ npm install + $ grunt serve -This will start an email server. The project is setup to deliver to the email server by default. To view messages -that are sent by your application, open your browser to http://127.0.0.1:1080 +(After the first run you only need to type ``grunt serve``) This will start an email server that listens on ``127.0.0.1:1025`` in addition to starting your Django project and a watch task for live reload. -To stop the email server:: +To view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025`` - $ grunt stop-email-server - -The email server listens on 127.0.0.1:1025 +The email server will exit when you exit the Grunt task on the CLI with Ctrl+C. {% endif %} diff --git a/{{cookiecutter.repo_name}}/config/settings/local.py b/{{cookiecutter.repo_name}}/config/settings/local.py index cbe5d58db..256138832 100644 --- a/{{cookiecutter.repo_name}}/config/settings/local.py +++ b/{{cookiecutter.repo_name}}/config/settings/local.py @@ -25,7 +25,7 @@ SECRET_KEY = env("DJANGO_SECRET_KEY", default='CHANGEME!!!') # ------------------------------------------------------------------------------ EMAIL_HOST = 'localhost' EMAIL_PORT = 1025 -{%if cookiecutter.use_maildump == "n" -%} +{%if cookiecutter.use_mailhog == "n" -%} EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.console.EmailBackend') {%- endif %} diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index a9b63d442..04639e4f3 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -13,15 +13,3 @@ django-debug-toolbar==1.4 # improved REPL ipdb==0.8.1 - -{% if cookiecutter.use_maildump == "y" -%} -# Required by maildump. -{% if cookiecutter.use_python2 == 'n' -%} -# Need to pin dependency to gevent beta to be Python 3-compatible. -gevent==1.1b6 -{% else -%} -gevent==1.0.2 -{% endif -%} -# Enables better email testing -maildump==0.5.1 -{%- endif %} From c653801d5ae72005b9307bf41277ded4e48ca016 Mon Sep 17 00:00:00 2001 From: Tom Atkins Date: Mon, 16 Nov 2015 19:17:03 +0000 Subject: [PATCH 253/402] Add mailhog binary to gitignore --- {{cookiecutter.repo_name}}/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore index 0757b98b5..4b288b5b7 100644 --- a/{{cookiecutter.repo_name}}/.gitignore +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -60,3 +60,6 @@ node_modules/ # Hitch directory tests/.hitch + +# MailHog binary +mailhog From c5481135f2b389678e642ef9e0e6fe018d1161c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bogda=C5=82?= Date: Wed, 18 Nov 2015 13:52:45 +0100 Subject: [PATCH 254/402] Use python 3.5 on Heroku --- {{cookiecutter.repo_name}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/runtime.txt b/{{cookiecutter.repo_name}}/runtime.txt index 18104d92b..8d5e4598d 100644 --- a/{{cookiecutter.repo_name}}/runtime.txt +++ b/{{cookiecutter.repo_name}}/runtime.txt @@ -1,3 +1,3 @@ {% if cookiecutter.use_python2 == 'n' -%} -python-3.4.3 +python-3.5.0 {%- endif %} From 518862d328eada79d77713fda71ff8d403011778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Bogda=C5=82?= Date: Wed, 18 Nov 2015 15:07:08 +0100 Subject: [PATCH 255/402] Use python 3.5 on Travis --- {{cookiecutter.repo_name}}/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/.travis.yml b/{{cookiecutter.repo_name}}/.travis.yml index 9796896f6..85421fb96 100644 --- a/{{cookiecutter.repo_name}}/.travis.yml +++ b/{{cookiecutter.repo_name}}/.travis.yml @@ -9,7 +9,7 @@ before_install: language: python python: {% if cookiecutter.use_python2 == 'n' -%} - - "3.4" + - "3.5" {% else %} - "2.7" {%- endif %} From c5209bd7b5d2a533a7f239b817652c653c6d8119 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 18 Nov 2015 17:19:53 -0800 Subject: [PATCH 256/402] Updated contributors and changelog for @keybit's work --- CHANGELOG.md | 8 ++++++++ CONTRIBUTORS.rst | 1 + 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b4d8169..db7baf434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,17 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-11-18] +### Added +- Mailhog as a replacement for Maildump + +### Removed +- Maildump because it didn't support Python 3 + ## [2015-11-17] ### Added - initial configuration to support opbeat (@burhan) + ### Removed - Took *.pyc out of .gitignore, because it's already covered by *.py[cod] (@audreyr) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 8505d2559..f6c570418 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -64,6 +64,7 @@ Code Contributors * Garry Polley / @garrypolley * Théo Segonds / show0k * Cristian Vargas / @cdvv7788 +* Tom Atkins / @keybits \* Possesses commit rights From d6de05e971e914b828243234996ec61b30c87811 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 20 Nov 2015 08:55:41 -0800 Subject: [PATCH 257/402] Updated changelog and contributors. Now including @tedmiston --- CHANGELOG.md | 9 +++++++-- CONTRIBUTORS.rst | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db7baf434..ea55cbfd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,17 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-11-20] +### Changed +- Using python 3.5 on Heroku/Travis (@bogdal) +- Fixed typo in README (@tedmiston) + ## [2015-11-18] ### Added -- Mailhog as a replacement for Maildump +- Mailhog as a replacement for Maildump (@keybits ) ### Removed -- Maildump because it didn't support Python 3 +- Maildump because it didn't support Python 3 (@keybits) ## [2015-11-17] ### Added diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index f6c570418..f54244e0a 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -65,6 +65,7 @@ Code Contributors * Théo Segonds / show0k * Cristian Vargas / @cdvv7788 * Tom Atkins / @keybits +* Taylor Edmiston / @tedmiston \* Possesses commit rights From 733071f121cdbc314d2725b2e1a1d9b928c2040e Mon Sep 17 00:00:00 2001 From: Jan Van Bruggen Date: Sun, 22 Nov 2015 08:38:36 -0800 Subject: [PATCH 258/402] Move div class unquote outside the if tag --- .../{{cookiecutter.repo_name}}/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index 1afc57c31..16ecd6247 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -76,7 +76,7 @@ {% if messages %} {% for message in messages %} -
{{ message }}
+
{{ message }}
{% endfor %} {% endif %} From 1d9e0960bc4e689658f12907b33f01dc350251e4 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Sun, 22 Nov 2015 13:56:55 -0300 Subject: [PATCH 259/402] add Jan Van Bruggen to CONTRIBUTORS. Update CHANGELOG --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.rst | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea55cbfd3..8c2db0508 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/). +## [2015-11-22] +### Changed +- Move div class unquote outside the django if tag (@jvanbrug) + ## [2015-11-20] ### Changed - Using python 3.5 on Heroku/Travis (@bogdal) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index f54244e0a..9cbc4ed3e 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -66,6 +66,7 @@ Code Contributors * Cristian Vargas / @cdvv7788 * Tom Atkins / @keybits * Taylor Edmiston / @tedmiston +* Jan Van Bruggen / @jvanbrug \* Possesses commit rights From dc47e19a03a2632ad85564d1770c071512813d54 Mon Sep 17 00:00:00 2001 From: Jon Miller Date: Sun, 22 Nov 2015 15:42:35 -0600 Subject: [PATCH 260/402] Change gevent from 1.0.2 to 1.1rc1 to support Py35. --- {{cookiecutter.repo_name}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index b64f3dd72..b262cbf03 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -11,7 +11,7 @@ psycopg2==2.6.1 # WSGI Handler # ------------------------------------------------ -gevent==1.0.2 +gevent==1.1rc1 gunicorn==19.3.0 # Static and Media Storage From a5675f89e4692980f4961e3bd61c6bc834c98d44 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Sun, 22 Nov 2015 23:24:25 +0100 Subject: [PATCH 261/402] Make sure that python 2 users can stay on stable --- {{cookiecutter.repo_name}}/requirements/production.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index b262cbf03..f28071e0a 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -11,7 +11,12 @@ psycopg2==2.6.1 # WSGI Handler # ------------------------------------------------ +{% if cookiecutter.use_python2 == 'y' -%} +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 +{% endif %} gunicorn==19.3.0 # Static and Media Storage From 20ea440cc27290622b544c9c881a20f5856edf27 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Sun, 22 Nov 2015 23:27:11 +0100 Subject: [PATCH 262/402] add gevent python3 fix to the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c2db0508..6200b7fea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-22] ### Changed - Move div class unquote outside the django if tag (@jvanbrug) +- Changed gevent to `1.1rc1` for python 3 users (@jondelmil / @jayfk) ## [2015-11-20] ### Changed From 5aec6203c229eb15268c8c10963571e97b8474b3 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Sun, 22 Nov 2015 23:28:27 +0100 Subject: [PATCH 263/402] add Jon Miller to contributors --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 9cbc4ed3e..0e1bf141a 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -67,6 +67,7 @@ Code Contributors * Tom Atkins / @keybits * Taylor Edmiston / @tedmiston * Jan Van Bruggen / @jvanbrug +* Jon Miller / @jondelmil \* Possesses commit rights From 609214576059454098d69e833e5c30bd4769d8f9 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Mon, 23 Nov 2015 21:15:11 -0300 Subject: [PATCH 264/402] update requirements --- CHANGELOG.md | 6 ++++++ README.rst | 2 +- requirements.txt | 6 +++--- {{cookiecutter.repo_name}}/requirements/base.txt | 2 +- {{cookiecutter.repo_name}}/requirements/local.txt | 6 +++--- {{cookiecutter.repo_name}}/requirements/test.txt | 4 ++-- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 6 +++--- .../{{cookiecutter.repo_name}}/templates/base.html | 2 +- 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6200b7fea..111f20078 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/). +## [2015-11-23] +### Changed +- Update AngularJS version to 1.4.8 (@luzfcb) +- Update version of cookiecutter, pytest, tox, whitenoise, django-test-plus, django_coverage_plugin, Werkzeug, hitchserve, tornado, unixpackage (@luzfcb) +- Update 'now' date in cookiecutter.json (@luzfcb) + ## [2015-11-22] ### Changed - Move div class unquote outside the django if tag (@jvanbrug) diff --git a/README.rst b/README.rst index 927246354..d6bfbfdea 100644 --- a/README.rst +++ b/README.rst @@ -111,7 +111,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/01/13]: 2015/09/30 + now [2015/11/22]: 2015/11/22 year [2015]: use_whitenoise [y]: n use_celery [n]: y diff --git a/requirements.txt b/requirements.txt index aadbfa9ee..4c9e23877 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==1.2.1 +cookiecutter==1.3.0 flake8==2.5.0 sh binaryornot==0.4.0 @@ -10,8 +10,8 @@ ipython==4.0.0 # Testing # ------------------------------------- -pytest==2.8.2 +pytest==2.8.3 git+git://github.com/mverteuil/pytest-ipdb.git pep8==1.6.2 pyflakes==1.0.0 -tox==2.1.1 +tox==2.2.1 diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 853abcfcf..1d015b50c 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -5,7 +5,7 @@ django==1.8.6 django-environ==0.4.0 django-secure==1.0.1 {% if cookiecutter.use_whitenoise == 'y' -%} -whitenoise==2.0.4 +whitenoise==2.0.6 {%- endif %} diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 04639e4f3..d91e2e3da 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -1,11 +1,11 @@ # Local development dependencies go here -r base.txt coverage==4.0.2 -django_coverage_plugin==1.0 +django_coverage_plugin==1.1 Sphinx django-extensions==1.5.9 -Werkzeug==0.10.4 -django-test-plus==1.0.9 +Werkzeug==0.11.2 +django-test-plus==1.0.11 factory_boy==2.6.0 # 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 b12b4d231..c55494324 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.2 -django_coverage_plugin==1.0 +django_coverage_plugin==1.1 flake8==2.5.0 -django-test-plus==1.0.9 +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 36f791a26..d59a198ad 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -8,7 +8,7 @@ hitchpostgres==0.6.7 hitchpython==0.5.0 hitchredis==0.4.5 hitchselenium==0.4.8 -hitchserve==0.4.5 +hitchserve==0.4.6 hitchsmtp==0.2.1 hitchsystem==0.1.1 hitchtest==0.9.2 @@ -33,7 +33,7 @@ selenium==2.48.0 simplegeneric==0.8.1 six==1.10.0 tblib==1.1.0 -tornado==4.2.1 +tornado==4.3 traitlets==4.0.0 -unixpackage==0.3.7 +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 16ecd6247..caf7a1bdb 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 0ef11d1818e893186cff1ad963c7922012674471 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Mon, 23 Nov 2015 23:11:52 -0300 Subject: [PATCH 265/402] sh package version pinned to 1.11 --- CHANGELOG.md | 1 + requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 111f20078..65f46356e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Update AngularJS version to 1.4.8 (@luzfcb) - Update version of cookiecutter, pytest, tox, whitenoise, django-test-plus, django_coverage_plugin, Werkzeug, hitchserve, tornado, unixpackage (@luzfcb) - Update 'now' date in cookiecutter.json (@luzfcb) +- `sh` package version pinned to `1.11` (@luzfcb) ## [2015-11-22] ### Changed diff --git a/requirements.txt b/requirements.txt index 4c9e23877..fc7dd5934 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.3.0 flake8==2.5.0 -sh +sh==1.11 binaryornot==0.4.0 # Debugging From d33e673c3cccbd7dee016e72f1cb94ba8770d204 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 24 Nov 2015 20:14:01 -0300 Subject: [PATCH 266/402] update requirements --- CHANGELOG.md | 4 ++++ {{cookiecutter.repo_name}}/requirements/base.txt | 2 +- {{cookiecutter.repo_name}}/requirements/local.txt | 2 +- {{cookiecutter.repo_name}}/requirements/test.txt | 2 +- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65f46356e..0b0cc4d59 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/). +## [2015-11-24] +### Changed +- Update version of Django, coverage and click (@luzfcb) + ## [2015-11-23] ### Changed - Update AngularJS version to 1.4.8 (@luzfcb) diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 1d015b50c..50fefc55f 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -1,5 +1,5 @@ # Bleeding edge Django -django==1.8.6 +django==1.8.7 # Configuration django-environ==0.4.0 diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index d91e2e3da..d0e65d51d 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -1,6 +1,6 @@ # Local development dependencies go here -r base.txt -coverage==4.0.2 +coverage==4.0.3 django_coverage_plugin==1.1 Sphinx django-extensions==1.5.9 diff --git a/{{cookiecutter.repo_name}}/requirements/test.txt b/{{cookiecutter.repo_name}}/requirements/test.txt index c55494324..384ff9004 100644 --- a/{{cookiecutter.repo_name}}/requirements/test.txt +++ b/{{cookiecutter.repo_name}}/requirements/test.txt @@ -7,7 +7,7 @@ psycopg2==2.6.1 {%- endif %} -coverage==4.0.2 +coverage==4.0.3 django_coverage_plugin==1.1 flake8==2.5.0 django-test-plus==1.0.11 diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index d59a198ad..b2f0441fa 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -1,4 +1,4 @@ -click==5.1 +click==6.0 colorama==0.3.3 decorator==4.0.4 docopt==0.6.2 From c9f500116d0ffe4bf95ee7e9a036538dac74f87f Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 24 Nov 2015 22:00:16 -0300 Subject: [PATCH 267/402] fix celery configuration in local.py --- CHANGELOG.md | 1 + {{cookiecutter.repo_name}}/config/settings/local.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0cc4d59..aba8a4bb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-24] ### Changed - Update version of Django, coverage and click (@luzfcb) +- Fixed configuration for Celery in local.py. (@luzfcb @hackebrot) ## [2015-11-23] ### Changed diff --git a/{{cookiecutter.repo_name}}/config/settings/local.py b/{{cookiecutter.repo_name}}/config/settings/local.py index 256138832..cee3e9cc6 100644 --- a/{{cookiecutter.repo_name}}/config/settings/local.py +++ b/{{cookiecutter.repo_name}}/config/settings/local.py @@ -60,7 +60,7 @@ INSTALLED_APPS += ('django_extensions', ) # TESTING # ------------------------------------------------------------------------------ TEST_RUNNER = 'django.test.runner.DiscoverRunner' -{% if cookiecutter.celery_support == "y" %} +{% if cookiecutter.use_celery == "y" %} ########## CELERY # In development, all tasks will be executed locally by blocking until the task returns CELERY_ALWAYS_EAGER = True From fa46eb7cc2133d068ff65c4c36db842045ea2f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Wed, 25 Nov 2015 09:35:17 -0300 Subject: [PATCH 268/402] update psutil version to 3.3.0 --- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index b2f0441fa..f1db80fc8 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -21,7 +21,7 @@ path.py==8.1.2 patool==1.8 pexpect==4.0.1 pickleshare==0.5 -psutil==3.2.2 +psutil==3.3.0 ptyprocess==0.5 pykwalify==1.5.0 python-build==0.2.5 From 6f0c2af33aabaa699222ac5e2ccb4e9c1bff413b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Wed, 25 Nov 2015 09:36:10 -0300 Subject: [PATCH 269/402] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aba8a4bb1..091e73d35 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/). +## [2015-11-25] +### Changed +- Update version of psutil (@luzfcb) + ## [2015-11-24] ### Changed - Update version of Django, coverage and click (@luzfcb) From 7b949ba6cc9a92ed4d3a4b93c56b253e7c2cb325 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Wed, 25 Nov 2015 08:20:19 -0800 Subject: [PATCH 270/402] Update gunicorn to 19.4.1. --- CHANGELOG.md | 1 + {{cookiecutter.repo_name}}/requirements/production.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 091e73d35..12fb54e22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-25] ### Changed - Update version of psutil (@luzfcb) +- Update version of gunicorn (@audreyr) ## [2015-11-24] ### Changed diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index f28071e0a..fedfa4817 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -17,7 +17,7 @@ gevent==1.0.2 # there's no python 3 support in stable, have to use the latest release candidate for gevent gevent==1.1rc1 {% endif %} -gunicorn==19.3.0 +gunicorn==19.4.1 # Static and Media Storage # ------------------------------------------------ From 59a6c637acece68910014df696a8acfe0fc7235b Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Wed, 25 Nov 2015 08:33:06 -0800 Subject: [PATCH 271/402] Remove debugging tools from non-generated part of project, since those are personal prefs. --- requirements.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index fc7dd5934..a1f3fae82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,15 +3,8 @@ flake8==2.5.0 sh==1.11 binaryornot==0.4.0 -# Debugging -# ------------------------------------- -ipdb==0.8.1 -ipython==4.0.0 - # Testing -# ------------------------------------- pytest==2.8.3 -git+git://github.com/mverteuil/pytest-ipdb.git pep8==1.6.2 pyflakes==1.0.0 tox==2.2.1 From fdf17c7e32214fca44d5d8870eaeda996b5a383d Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Wed, 25 Nov 2015 08:35:13 -0800 Subject: [PATCH 272/402] Update changelog about removing debugging tools. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12fb54e22..7760e655e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Update version of psutil (@luzfcb) - Update version of gunicorn (@audreyr) +- Remove debugging tools from non-generated part of cookiecutter-django, since those are personal prefs (@audreyr) ## [2015-11-24] ### Changed From 28311e7502576ff2cd5b10d7e4ade84360dc8a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Wed, 25 Nov 2015 14:35:07 -0300 Subject: [PATCH 273/402] update version of ipython --- {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index f1db80fc8..8c2bff5d3 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -13,7 +13,7 @@ hitchsmtp==0.2.1 hitchsystem==0.1.1 hitchtest==0.9.2 humanize==0.5.1 -ipython==4.0.0 +ipython==4.0.1 ipython-genutils==0.1.0 Jinja2==2.8 MarkupSafe==0.23 From 63b1f07cd2e447da785b1bbc2fc9a65d50e17470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Wed, 25 Nov 2015 14:35:56 -0300 Subject: [PATCH 274/402] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7760e655e..0dfa4bdb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-25] ### Changed -- Update version of psutil (@luzfcb) +- Update version of psutil, ipython (@luzfcb) - Update version of gunicorn (@audreyr) - Remove debugging tools from non-generated part of cookiecutter-django, since those are personal prefs (@audreyr) From 252d005e774900945baca58666c922798b9e159a Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Wed, 25 Nov 2015 16:29:53 -0300 Subject: [PATCH 275/402] update version of django in setup.py --- CHANGELOG.md | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dfa4bdb7..011457607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Update version of psutil, ipython (@luzfcb) - Update version of gunicorn (@audreyr) - Remove debugging tools from non-generated part of cookiecutter-django, since those are personal prefs (@audreyr) +- Update version of Django in setup.py (@luzfcb) ## [2015-11-24] ### Changed diff --git a/setup.py b/setup.py index 00438c8da..fb6c9a317 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.8.6" +version = "1.8.7" if sys.argv[-1] == 'tag': os.system("git tag -a %s -m 'version %s'" % (version, version)) From ae42895c09f67dcc4f6ffc989f52d5e3794d6899 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Sun, 29 Nov 2015 10:24:03 -0300 Subject: [PATCH 276/402] update requirements --- CHANGELOG.md | 4 ++++ {{cookiecutter.repo_name}}/tests/hitchreqs.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 011457607..75bdc50eb 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/). +## [2015-11-29] +### Changed +- Update version of click and python-build (@luzfcb) + ## [2015-11-25] ### Changed - Update version of psutil, ipython (@luzfcb) diff --git a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt index 8c2bff5d3..4b9cd6836 100644 --- a/{{cookiecutter.repo_name}}/tests/hitchreqs.txt +++ b/{{cookiecutter.repo_name}}/tests/hitchreqs.txt @@ -1,4 +1,4 @@ -click==6.0 +click==6.2 colorama==0.3.3 decorator==4.0.4 docopt==0.6.2 @@ -24,7 +24,7 @@ pickleshare==0.5 psutil==3.3.0 ptyprocess==0.5 pykwalify==1.5.0 -python-build==0.2.5 +python-build==0.2.6 python-dateutil==2.4.2 pyuv==1.2.0 PyYAML==3.11 From 917bf99ea3e773dd194d6344d5460ac4bc433f46 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 1 Dec 2015 14:09:50 +0000 Subject: [PATCH 277/402] Update developing-locally.rst --- docs/developing-locally.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 349c9120b..b3c533eff 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -9,7 +9,11 @@ The steps below will get you up and running with a local development environment * virtualenv * PostgreSQL -First make sure to create and activate a virtualenv_, then open a terminal at the project root and install the requirements for local development:: +First make sure to create and activate a virtualenv_, then open a terminal at the project root and install the os dependencies:: + + $ ./install_os_dependencies.sh install + +Then install the requirements for your local development:: $ pip install -r requirements/local.txt From a304e466a5e9252e78ba63379a303813699029b1 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 1 Dec 2015 14:25:55 +0000 Subject: [PATCH 278/402] Update developing-locally.rst --- docs/developing-locally.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index b3c533eff..44fb6b7fb 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -11,7 +11,7 @@ The steps below will get you up and running with a local development environment First make sure to create and activate a virtualenv_, then open a terminal at the project root and install the os dependencies:: - $ ./install_os_dependencies.sh install + $ sudo ./install_os_dependencies.sh install Then install the requirements for your local development:: From a24ff2c4a75be9ecf12356e335075783723be958 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 1 Dec 2015 14:28:21 +0000 Subject: [PATCH 279/402] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75bdc50eb..66ddcb9fb 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/). +## [2015-12-01] +### Changed +- Update documentation to include the installation os dependecies before development requirements (@failsafe86) + ## [2015-11-29] ### Changed - Update version of click and python-build (@luzfcb) From 564cacd87bb73b5a87d1a50e40396abdc9e50640 Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Tue, 1 Dec 2015 14:29:56 +0000 Subject: [PATCH 280/402] Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 0e1bf141a..51bac95bf 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -68,6 +68,7 @@ Code Contributors * Taylor Edmiston / @tedmiston * Jan Van Bruggen / @jvanbrug * Jon Miller / @jondelmil +* Thomas Korrison / @failsafe86 \* Possesses commit rights From 062d6d31a4d796ae5cfc96fc07624ef0373798b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Wed, 2 Dec 2015 08:36:15 -0300 Subject: [PATCH 281/402] pin requires.io django version to < 1.9 --- {{cookiecutter.repo_name}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index 50fefc55f..eac71dee2 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -1,5 +1,5 @@ # Bleeding edge Django -django==1.8.7 +django==1.8.7 # rq.filter: >=1.8,<1.9 # Configuration django-environ==0.4.0 From cc1da172f4ee46ab2ca8ea550fa92633976086d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz?= Date: Sat, 5 Dec 2015 20:12:53 +0100 Subject: [PATCH 282/402] [IMP] django-allauth configuration: Allow enable or disable user registration using ACCOUNT_ALLOW_REGISTRATION setting. --- CONTRIBUTORS.rst | 1 + docs/settings.rst | 7 +++++++ .../config/settings/common.py | 3 +++ .../{{cookiecutter.repo_name}}/users/adapter.py | 14 ++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 51bac95bf..0646e6684 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -69,6 +69,7 @@ Code Contributors * Jan Van Bruggen / @jvanbrug * Jon Miller / @jondelmil * Thomas Korrison / @failsafe86 +* David Díaz / @DavidDiazPinto * \* Possesses commit rights diff --git a/docs/settings.rst b/docs/settings.rst index 629e60f43..aec7c5137 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -45,3 +45,10 @@ DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a DJANGO_OPBEAT_SECRET_TOKEN OPBEAT['SECRET_TOKEN'] n/a raises error DJANGO_OPBEAT_ORGANIZATION_ID OPBEAT['ORGANIZATION_ID'] n/a raises error ======================================= =========================== ============================================== ====================================================================== + +-------------- +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 diff --git a/{{cookiecutter.repo_name}}/config/settings/common.py b/{{cookiecutter.repo_name}}/config/settings/common.py index a0ab6063e..0a5deebef 100644 --- a/{{cookiecutter.repo_name}}/config/settings/common.py +++ b/{{cookiecutter.repo_name}}/config/settings/common.py @@ -211,6 +211,9 @@ 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_ALLOW_REGISTRATION = True # Custom user app defaults # Select the correct user model diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py new file mode 100644 index 000000000..1d4dda1c6 --- /dev/null +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/adapter.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +from django.conf import settings +from allauth.account.adapter import DefaultAccountAdapter +from allauth.socialaccount.adapter import DefaultSocialAccountAdapter + + +class AccountAdapter(DefaultAccountAdapter): + def is_open_for_signup(self, request): + return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True) + + +class SocialAccountAdapter(DefaultSocialAccountAdapter): + def is_open_for_signup(self, request): + return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True) From 677927d78675a02f452b3add91610d9905425bc7 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sun, 6 Dec 2015 16:07:42 -0800 Subject: [PATCH 283/402] Merge of @burhans reorg --- CHANGELOG.md | 6 +- CONTRIBUTORS.rst | 198 ++++++++++++++++++++++++++++++----------------- 2 files changed, 133 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66ddcb9fb..85b02a9ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,13 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-12-06] +### Changed +- Reorganization of contributors (@burhan) + ## [2015-12-01] ### Changed -- Update documentation to include the installation os dependecies before development requirements (@failsafe86) +- Update documentation to include the installation os dependencies before development requirements (@failsafe86) ## [2015-11-29] ### Changed diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 51bac95bf..3e56e3948 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -1,82 +1,140 @@ Code Contributors ================= -* Daniel Greenfeld * -* a7p -* Lukas Klein -* Ben Lopatin -* Bouke Haarsma -* Agam Dua -* Vitaly Babiy -* Jim Munro * -* Tom Offermann -* Lyla Fischer -* Taylor Baldwin -* Chris Curvey (@ccurvey) -* Fábio C. Barrionuevo da Luz (@luzfcb) * -* Saurabh Kumar (gh: theskumar / @_theskumar) * -* Ashley Camba -* Yaroslav Halchenko -* Pablo / @oubiga -* Tom Atkins / @knitatoms -* Julio Castillo / @juliocc -* Kevin A. Stone -* mozillazg / @mozillazg -* Henrique G. G. Pereira / @ikkebr -* Travis McNeill / gh: Tavistock / @tavistock_esq -* Matt Linares -* Russell Davies -* Sławek Ehlert / @slafs -* Alberto Sanchez / @alb3rto -* Eyad Al Sibai / @eyadsibai -* Chris Franklin -* Benjamin Abel -* Felipe Arruda / @arruda -* Matt Warren / @mfwarren -* Martin Blech -* Andy Rose -* Andrew Mikhnevich / @zcho -* Kevin Ndung'u / @kevgathuku -* Kaveh / @ka7eh -* Alex Tsai / @caffodian -* Garry Cairns / @garry-cairns -* Lin Xianyi / @iynaix -* Adam Dobrawy / @ad-m -* Daniele Tricoli / @eriol -* Harry Percival / @hjwp -* Cullen Rhodes / @c-rhodes -* Burhan Khalid / @burhan -* Audrey Roy Greenfeld / @audreyr (and creator/maintainer of cookiecutter) * -* Jannis Gebauer / @jayfk * -* stepmr / @stepmr -* Adam Bogdał / @bogdal -* Barclay Gauld / @yunti -* Ian Lee / @IanLee1521 -* Roman Afanaskin / @siauPatrick -* @kaidokert -* Raphael Pierzina / @hackebrot -* Alvaro [Andor] / @andor-pierdelacabeza -* Chris Franklin / @hairychris -* Anna Callahan / @jazztpt -* Mathijs Hoogland / @MathijsHoogland -* Chris Pappalardo / @ChrisPappalardo -* Amjith Ramanujam / @amjith -* Garry Polley / @garrypolley -* Théo Segonds / show0k -* Cristian Vargas / @cdvv7788 -* Tom Atkins / @keybits -* Taylor Edmiston / @tedmiston -* Jan Van Bruggen / @jvanbrug -* Jon Miller / @jondelmil -* Thomas Korrison / @failsafe86 +These contributors have commit flags for the repository, +and are able to accept and merge pull requests. -\* Possesses commit rights +=========================== ============= =========== +Name Github Twitter +=========================== ============= =========== +Daniel Greenfeld `@pydanny`_ @pydanny +Audrey Roy Greenfeld* `@audreyr`_ +Jim Munro +Fábio C. Barrionuevo da Luz @luzfcb +Saurabh Kumar `@theskumar`_ @_theskumar +Jannis Gebauer `@jayfk`_ +=========================== ============= =========== + +*Audrey is also the maintainer of cookiecutter.* + +.. _@pydanny: https://github.com/pydanny +.. _@luzfcb: https://github.com/luzfcb +.. _@theskumar: https://github.com/theskumar +.. _@audreyr: https://github.com/audreyr +.. _@jayfk: https://github.com/jayfk Special Thanks -============== +-------------- The following haven't provided code directly, but have provided guidance and advice. * Jannis Leidel (django-configurations) * Nate Aune * Barry Morrison + +Contributors +------------ +Listed in alphabetical order + +========================== ============================ ============== + Name Github Twitter +========================== ============================ ============== + a7p `@a7p`_ + Adam Bogdał `@bogdal`_ + Adam Dobrawy `@ad-m`_ + Agam Dua + Alberto Sanchez `@alb3rto`_ + Alex Tsai `@caffodian`_ + Alvaro [Andor] `@andor-pierdelacabeza`_ + Amjith Ramanujam `@amjith`_ + Andrew Mikhnevich `@zcho`_ + Andy Rose + Anna Callahan `@jazztpt`_ + Ashley Camba + Barclay Gauld `@yunti`_ + Ben Lopatin + Benjamin Abel + Bouke Haarsma + Burhan Khalid `@burhan`_ @burhan + Chris Curvey `@ccurvey`_ + Chris Franklin + Chris Franklin `@hairychris`_ + Chris Pappalardo `@ChrisPappalardo`_ + Cristian Vargas `@cdvv7788`_ + Cullen Rhodes `@c-rhodes`_ + Daniele Tricoli `@eriol`_ + Eyad Al Sibai `@eyadsibai`_ + Felipe Arruda `@arruda`_ + Garry Cairns `@garry-cairns`_ + Garry Polley `@garrypolley`_ + Harry Percival `@hjwp`_ + Henrique G. G. Pereira `@ikkebr`_ + Ian Lee `@IanLee1521`_ + Julio Castillo `@juliocc`_ + Kaido Kert `@kaidokert`_ + Kaveh `@ka7eh`_ + Kevin A. Stone + Kevin Ndung'u `@kevgathuku`_ + Lin Xianyi `@iynaix`_ + Lukas Klein + Lyla Fischer + Martin Blech + Mathijs Hoogland `@MathijsHoogland`_ + Matt Linares + Matt Warren `@mfwarren`_ + mozillazg `@mozillazg`_ + Pablo `@oubiga`_ + Raphael Pierzina `@hackebrot`_ + Roman Afanaskin `@siauPatrick`_ + Russell Davies + stepmr `@stepmr`_ + Sławek Ehlert `@slafs`_ + Taylor Baldwin + Théo Segonds `@show0k`_ + Tom Atkins `@knitatoms`_ + Tom Offermann + Travis McNeill `@Travistock`_ @tavistock_esq + Vitaly Babiy + Yaroslav Halchenko +========================== ============================ ============== + +.. _@a7p: https://github.com/a7p +.. _@bogdal: https://github.com/bogdal +.. _@ad-m: https://github.com/ad-m +.. _@alb3rto: https://github.com/alb3rto +.. _@caffodian: https://github.com/caffodian +.. _@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 +.. _@burhan: https://github.com/burhan +.. _@ccurvey: https://github.com/ccurvey +.. _@hairychris: https://github.com/hairychris +.. _@ChrisPappalardo: https://github.com/ChrisPappalardo +.. _@cdvv7788: https://github.com/cdvv7788 +.. _@c-rhodes: https://github.com/c-rhodes +.. _@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 +.. _@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 +.. _@iynaix: https://github.com/iynaix +.. _@MathijsHoogland: https://github.com/MathijsHoogland +.. _@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 From 21f5637a651729ef3f3170e8fa4909f9954d3313 Mon Sep 17 00:00:00 2001 From: Sydney Henry Date: Tue, 8 Dec 2015 22:10:46 -0700 Subject: [PATCH 284/402] SECRET_KEY gen to short when `heroku run python manage.py check --deploy` is ran this error occurs ?: (security.W009) Your SECRET_KEY has less than 50 characters or less than 5 unique characters. Please generate a long and random SECRET_KEY, otherwise many of Django's security-critical features will be vulnerable to attack. changing the num of ran to a larger number fixes this issue --- docs/deployment-on-heroku.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index d0d5abc9e..c681d508c 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -16,8 +16,8 @@ You can either push the 'deploy' button in your generated README.rst or run thes heroku addons:create heroku-redis:hobby-dev heroku addons:create mailgun - heroku config:set DJANGO_ADMIN_URL=`openssl rand -base64 32` - heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32` + heroku config:set DJANGO_ADMIN_URL=`openssl rand -base64 64` + heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 64` heroku config:set DJANGO_SETTINGS_MODULE='config.settings.production' heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com' From 4291243a9c3c66f8bf04f7b1fd9547df9abc96f4 Mon Sep 17 00:00:00 2001 From: Sydney Henry Date: Tue, 8 Dec 2015 22:16:22 -0700 Subject: [PATCH 285/402] Keep admin url short --- docs/deployment-on-heroku.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index c681d508c..82bdbace4 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -16,7 +16,7 @@ You can either push the 'deploy' button in your generated README.rst or run thes heroku addons:create heroku-redis:hobby-dev heroku addons:create mailgun - heroku config:set DJANGO_ADMIN_URL=`openssl rand -base64 64` + heroku config:set DJANGO_ADMIN_URL=`openssl rand -base64 32` heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 64` heroku config:set DJANGO_SETTINGS_MODULE='config.settings.production' heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com' From c2e79902bf3f2c7d00531a1de2a920be2050e4ac Mon Sep 17 00:00:00 2001 From: areski Date: Wed, 9 Dec 2015 13:33:17 +0100 Subject: [PATCH 286/402] Bump Django to v1.9 --- README.rst | 2 +- docs/developing-locally.rst | 2 +- setup.py | 2 +- {{cookiecutter.repo_name}}/requirements/base.txt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index d6bfbfdea..d020aa71a 100644 --- a/README.rst +++ b/README.rst @@ -20,7 +20,7 @@ A Cookiecutter_ template for Django. Features --------- -* For Django 1.8 +* For Django 1.9 * Renders Django projects with 100% test coverage * Twitter Bootstrap_ v4.0.0 - alpha_ * End-to-end via Hitch_ diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 44fb6b7fb..3be7940d7 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -33,7 +33,7 @@ You can now run the usual Django ``migrate`` and ``runserver`` command:: django-allauth sends an email to verify users (and superusers) after signup and login (if they are still not verified). To send email you need to `configure your email backend`_ -.. _configure your email backend: http://docs.djangoproject.com/en/1.8/topics/email/#smtp-backend +.. _configure your email backend: http://docs.djangoproject.com/en/1.9/topics/email/#smtp-backend In development you can (optionally) use MailHog_ for email testing. MailHog is built with Go so there are no dependencies. To use MailHog:: diff --git a/setup.py b/setup.py index fb6c9a317..854370213 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ setup( classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', - 'Framework :: Django :: 1.8', + 'Framework :: Django :: 1.9', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index eac71dee2..6d3c39719 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -1,5 +1,5 @@ # Bleeding edge Django -django==1.8.7 # rq.filter: >=1.8,<1.9 +django==1.9.0 # Configuration django-environ==0.4.0 @@ -12,7 +12,7 @@ whitenoise==2.0.6 # Forms django-braces==1.8.1 django-crispy-forms==1.5.2 -django-floppyforms==1.5.2 +django-floppyforms==1.6.0 # Models django-model-utils==2.3.1 From fc37d656615211ba0ce044c8cb3050181600d1cb Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 11 Dec 2015 08:53:43 -0300 Subject: [PATCH 287/402] fix issue #436 --- CHANGELOG.md | 4 ++++ {{cookiecutter.repo_name}}/tests/engine.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85b02a9ba..4727b77fe 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/). +## [2015-12-11] +### Changed +- Fix issue #436 - cookiecutter variable name was renamed from `celery_support` to `use_celery` in `tests/engine.py` (@luzfcb @otakucode) + ## [2015-12-06] ### Changed - Reorganization of contributors (@burhan) diff --git a/{{cookiecutter.repo_name}}/tests/engine.py b/{{cookiecutter.repo_name}}/tests/engine.py index b9b082da6..6b7b63b9a 100644 --- a/{{cookiecutter.repo_name}}/tests/engine.py +++ b/{{cookiecutter.repo_name}}/tests/engine.py @@ -62,7 +62,7 @@ class ExecutionEngine(hitchtest.ExecutionEngine): redis_package=redis_package, port=16379, ) -{% if cookiecutter.celery_support == "y" %} +{% if cookiecutter.use_celery == "y" %} self.services['Celery'] = hitchpython.CeleryService( python=python_package.python, app="{{cookiecutter.repo_name}}.taskapp", loglevel="INFO", From d21b021e7ac5562b637c10c33a69838a9b085a2b Mon Sep 17 00:00:00 2001 From: yunti Date: Fri, 11 Dec 2015 14:43:30 +0000 Subject: [PATCH 288/402] Update runtime.txt --- {{cookiecutter.repo_name}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/runtime.txt b/{{cookiecutter.repo_name}}/runtime.txt index 8d5e4598d..40b97bf81 100644 --- a/{{cookiecutter.repo_name}}/runtime.txt +++ b/{{cookiecutter.repo_name}}/runtime.txt @@ -1,3 +1,3 @@ {% if cookiecutter.use_python2 == 'n' -%} -python-3.5.0 +python-3.5.1 {%- endif %} From ae0a2b82badab32190026492b95d1c4a7dd60463 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 11 Dec 2015 07:35:19 -0800 Subject: [PATCH 289/402] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4727b77fe..292bf15f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-12-11] ### Changed -- Fix issue #436 - cookiecutter variable name was renamed from `celery_support` to `use_celery` in `tests/engine.py` (@luzfcb @otakucode) +- Fixed issue #436 - cookiecutter variable name was renamed from `celery_support` to `use_celery` in `tests/engine.py` (@luzfcb @otakucode) +- Updated Heroku runtime.txt for python 3.5.1 (@yunti) ## [2015-12-06] ### Changed From a588d804f71ac19a8a1e83779e6cd7f9290bc578 Mon Sep 17 00:00:00 2001 From: stepmr Date: Fri, 11 Dec 2015 17:42:30 -0800 Subject: [PATCH 290/402] Update runtime.txt - Support python-2.7.10 runtime --- {{cookiecutter.repo_name}}/runtime.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.repo_name}}/runtime.txt b/{{cookiecutter.repo_name}}/runtime.txt index 40b97bf81..84c90354c 100644 --- a/{{cookiecutter.repo_name}}/runtime.txt +++ b/{{cookiecutter.repo_name}}/runtime.txt @@ -1,3 +1,5 @@ {% if cookiecutter.use_python2 == 'n' -%} python-3.5.1 +{% else %} +python-2.7.10 {%- endif %} From 506eb22be0ab030b6b4ce6ffe28c41c757cee108 Mon Sep 17 00:00:00 2001 From: stepmr Date: Fri, 11 Dec 2015 17:56:54 -0800 Subject: [PATCH 291/402] Support opbeat logging with celery - support opbeat logging with celery - modify sentry imports to avoid conflicts --- .../taskapp/celery.py | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py index 30fda6eae..fd324e316 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py @@ -27,10 +27,27 @@ class CeleryConfig(AppConfig): {% if cookiecutter.use_sentry == "y" -%} if hasattr(settings, 'RAVEN_CONFIG'): # Celery signal registration - from raven import Client - from raven.contrib.celery import register_signal - client = Client(dsn=settings.RAVEN_CONFIG['DSN']) - register_signal(client) + from raven import Client as RavenClient + from raven.contrib.celery import register_signal as raven_register_signal + + raven_client = RavenClient(dsn=settings.RAVEN_CONFIG['DSN']) + raven_register_signal(raven_client) + {%- endif %} + + {% if cookiecutter.use_opbeat == "y" -%} + if hasattr(settings, 'OPBEAT'): + from opbeat.contrib.django.models import client as opbeat_client + from opbeat.contrib.django.models import logger as opbeat_logger + from opbeat.contrib.django.models import register_handlers as opbeat_register_handlers + from opbeat.contrib.celery import register_signal as opbeat_register_signal + + try: + opbeat_register_signal(opbeat_client) + except Exception as e: + opbeat_logger.exception('Failed installing celery hook: %s' % e) + + if 'opbeat.contrib.django' in settings.INSTALLED_APPS: + opbeat_register_handlers() {%- endif %} From 681247e4b7ea57ff393330923f4164e227c14d38 Mon Sep 17 00:00:00 2001 From: stepmr Date: Fri, 11 Dec 2015 23:10:08 -0800 Subject: [PATCH 292/402] Add celery worker to Procfile --- {{cookiecutter.repo_name}}/Procfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.repo_name}}/Procfile b/{{cookiecutter.repo_name}}/Procfile index c00f42350..1214b0120 100644 --- a/{{cookiecutter.repo_name}}/Procfile +++ b/{{cookiecutter.repo_name}}/Procfile @@ -1 +1,4 @@ web: gunicorn config.wsgi:application +{% if cookiecutter.use_celery == "y" -%} +worker: {% if cookiecutter.use_newrelic == "y" %}newrelic-admin run-program {% endif %}celery worker --app=stairmaster.taskapp --loglevel=info +{%- endif %} From f7572a55c10596a44644df0a4d90031a09ef278e Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sat, 12 Dec 2015 14:25:16 -0800 Subject: [PATCH 293/402] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 292bf15f7..4787636fb 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/). +## [2015-12-12] +### Added +- Celery worker to Heroku procfile + ## [2015-12-11] ### Changed - Fixed issue #436 - cookiecutter variable name was renamed from `celery_support` to `use_celery` in `tests/engine.py` (@luzfcb @otakucode) From 4338227f16c9a460a4f1b3511005cc48b798d1fb Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sun, 13 Dec 2015 09:39:05 -0800 Subject: [PATCH 294/402] Updated changelog --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4787636fb..ec5639744 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,14 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-12-13] +### Changed +- Support opbeat logging with celery (@stepmr) +- Update runtime.txt with PY2 support (@stepmr) + ## [2015-12-12] ### Added -- Celery worker to Heroku procfile +- Celery worker to Heroku procfile (@stepmr) ## [2015-12-11] ### Changed From 7d9eba607b816332db9c6e964e36af4a66b3fc73 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sun, 13 Dec 2015 09:44:53 -0800 Subject: [PATCH 295/402] Added @areski to our contributors list --- CHANGELOG.md | 1 + CONTRIBUTORS.rst | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5639744..8edb933ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-12-13] ### Changed +- Bumped Django to 1.9 (@areski) - Support opbeat logging with celery (@stepmr) - Update runtime.txt with PY2 support (@stepmr) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 3e56e3948..1f42a123c 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -7,7 +7,7 @@ and are able to accept and merge pull requests. =========================== ============= =========== Name Github Twitter =========================== ============= =========== -Daniel Greenfeld `@pydanny`_ @pydanny +Daniel Roy Greenfeld `@pydanny`_ @pydanny Audrey Roy Greenfeld* `@audreyr`_ Jim Munro Fábio C. Barrionuevo da Luz @luzfcb @@ -50,6 +50,7 @@ Listed in alphabetical order Andrew Mikhnevich `@zcho`_ Andy Rose Anna Callahan `@jazztpt`_ + Areski Belaid `@areski`_ Ashley Camba Barclay Gauld `@yunti`_ Ben Lopatin @@ -98,6 +99,7 @@ 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 From def4fcbafaac7a234e1e8305c798eda99ba76ce8 Mon Sep 17 00:00:00 2001 From: stepmr Date: Tue, 15 Dec 2015 15:29:00 -0800 Subject: [PATCH 296/402] Fix celery worker app name in Procfile --- {{cookiecutter.repo_name}}/Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/Procfile b/{{cookiecutter.repo_name}}/Procfile index 1214b0120..612f46625 100644 --- a/{{cookiecutter.repo_name}}/Procfile +++ b/{{cookiecutter.repo_name}}/Procfile @@ -1,4 +1,4 @@ web: gunicorn config.wsgi:application {% if cookiecutter.use_celery == "y" -%} -worker: {% if cookiecutter.use_newrelic == "y" %}newrelic-admin run-program {% endif %}celery worker --app=stairmaster.taskapp --loglevel=info +worker: {% if cookiecutter.use_newrelic == "y" %}newrelic-admin run-program {% endif %}celery worker --app={{cookiecutter.repo_name}}.taskapp --loglevel=info {%- endif %} From 244c81be66d36d426e8730aa8d82f06a6a2e3c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Tue, 15 Dec 2015 20:54:17 -0300 Subject: [PATCH 297/402] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8edb933ba..2dd80111d 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/). +## [2015-12-15] +### Changed +- Fix celery worker app name in Procfile (@stepmr) + ## [2015-12-13] ### Changed - Bumped Django to 1.9 (@areski) From cdd3932ff5e3e8f57b5cbc865789396d26aa962a Mon Sep 17 00:00:00 2001 From: dsclementsen Date: Wed, 16 Dec 2015 17:53:28 +1100 Subject: [PATCH 298/402] DJANGO_SENTRY_DSN env variable if use_sentry Closes pydanny/cookiecutter-django#446 --- CONTRIBUTORS.rst | 1 + {{cookiecutter.repo_name}}/env.example | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 1f42a123c..812bb4f69 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -64,6 +64,7 @@ Listed in alphabetical order Cristian Vargas `@cdvv7788`_ Cullen Rhodes `@c-rhodes`_ Daniele Tricoli `@eriol`_ + Davur Clementsen `@dsclementsen`_ @davur Eyad Al Sibai `@eyadsibai`_ Felipe Arruda `@arruda`_ Garry Cairns `@garry-cairns`_ diff --git a/{{cookiecutter.repo_name}}/env.example b/{{cookiecutter.repo_name}}/env.example index edc5454bf..749deaed6 100644 --- a/{{cookiecutter.repo_name}}/env.example +++ b/{{cookiecutter.repo_name}}/env.example @@ -12,7 +12,7 @@ DJANGO_MAILGUN_API_KEY= DJANGO_MAILGUN_SERVER_NAME= DJANGO_SERVER_EMAIL= DJANGO_SECURE_SSL_REDIRECT=False -{% if cookiecutter.use_whitenoise == 'y' -%} +{% if cookiecutter.use_sentry == 'y' -%} DJANGO_SENTRY_DSN= {% endif %} {% if cookiecutter.use_newrelic == 'y' -%} From 77c6a12eaa9b5cc05cbc57f82e87a51047e484f4 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Wed, 16 Dec 2015 14:12:47 +0530 Subject: [PATCH 299/402] fix(urls): update 4xx error pages preview, to accept exceptions closes #444 --- CHANGELOG.md | 3 +++ {{cookiecutter.repo_name}}/config/urls.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd80111d..73318e768 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/). +## [2015-12-16] +- Update preview 4xx error pages to accept `exception` argument (@theskumar) + ## [2015-12-15] ### Changed - Fix celery worker app name in Procfile (@stepmr) diff --git a/{{cookiecutter.repo_name}}/config/urls.py b/{{cookiecutter.repo_name}}/config/urls.py index 8afe9c069..b63a9731e 100644 --- a/{{cookiecutter.repo_name}}/config/urls.py +++ b/{{cookiecutter.repo_name}}/config/urls.py @@ -28,8 +28,8 @@ if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ - url(r'^400/$', default_views.bad_request), - url(r'^403/$', default_views.permission_denied), - url(r'^404/$', default_views.page_not_found), + 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'^404/$', default_views.page_not_found, kwargs={'exception': Exception("Page not Found")}), url(r'^500/$', default_views.server_error), ] From 91f223d7bd88a600b3f435a392fbf88a1b4380f9 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 21 Dec 2015 11:28:27 +0100 Subject: [PATCH 300/402] added raven logging for celery --- CHANGELOG.md | 4 ++++ .../{{cookiecutter.repo_name}}/taskapp/celery.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73318e768..4cf9060ec 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/). +## [2015-12-21] +### Changed +- Added sentry logger to celery config (@jayfk) + ## [2015-12-16] - Update preview 4xx error pages to accept `exception` argument (@theskumar) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py index fd324e316..7a089dbd7 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py @@ -29,11 +29,13 @@ class CeleryConfig(AppConfig): # Celery signal registration from raven import Client as RavenClient from raven.contrib.celery import register_signal as raven_register_signal - + from raven.contrib.celery import register_logger_signal as raven_register_logger_signal + raven_client = RavenClient(dsn=settings.RAVEN_CONFIG['DSN']) + raven_register_logger_signal(raven_client) raven_register_signal(raven_client) {%- endif %} - + {% if cookiecutter.use_opbeat == "y" -%} if hasattr(settings, 'OPBEAT'): from opbeat.contrib.django.models import client as opbeat_client From db4e3deeab3529144f8ad999fbd303f80f1dcc96 Mon Sep 17 00:00:00 2001 From: Jan Van Bruggen Date: Tue, 29 Dec 2015 12:09:41 -0800 Subject: [PATCH 301/402] Replace pull-right (broken) with pull-xs-right twbs/bootstrap#18340 removed `.pull-left` and `.pull-right` since they're redundant with `.pull-xs-left` and `.pull-xs-right`. This solves the styling bug explained in pydanny/cookiecutter-django#452. --- .../{{cookiecutter.repo_name}}/static/css/project.css | 4 ++-- .../{{cookiecutter.repo_name}}/static/sass/project.scss | 2 +- .../{{cookiecutter.repo_name}}/templates/base.html | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css index 08505aeef..5f23c427a 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css @@ -24,7 +24,7 @@ margin-left: 0; } - .nav.navbar-nav.pull-right { + .nav.navbar-nav.pull-xs-right { float: none !important; } } @@ -35,4 +35,4 @@ */ [hidden][style="display: block;"] { display: block !important; -} \ No newline at end of file +} diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss index 37c69e454..e737d593f 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss @@ -37,7 +37,7 @@ $red: #b94a48; margin-left: 0; } - .nav.navbar-nav.pull-right { + .nav.navbar-nav.pull-xs-right { float: none !important; } } diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index caf7a1bdb..9f2d6f5b0 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -35,7 +35,7 @@