From d1a763b9fed20e57e9a646eadc2684dcba0d7c98 Mon Sep 17 00:00:00 2001 From: Burhan Khalid Date: Fri, 8 Jan 2016 13:21:45 +0300 Subject: [PATCH 001/280] fixing typos (again) --- {{cookiecutter.repo_name}}/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/Dockerfile b/{{cookiecutter.repo_name}}/Dockerfile index 0cb397cdd..f2f662d5d 100644 --- a/{{cookiecutter.repo_name}}/Dockerfile +++ b/{{cookiecutter.repo_name}}/Dockerfile @@ -17,7 +17,7 @@ RUN chown -R django /app COPY ./compose/django/gunicorn.sh /gunicorn.sh COPY ./compose/django/entrypoint.sh /entrypoint.sh RUN sed -i 's/\r//' /entrypoint.sh -RUN set -i 's/\r//' /guincorn.sh +RUN sed -i 's/\r//' /gunicorn.sh RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh From 3d25befb3f43d8965816376a4e64b868e0db6f6d Mon Sep 17 00:00:00 2001 From: Delio Castillo Date: Thu, 22 Sep 2016 11:42:16 -0700 Subject: [PATCH 002/280] Updates to anymail 0.5 and adds new config setting for MAILGUN_SENDER_DOMAIN --- CHANGELOG.md | 4 ++++ docs/deployment-on-heroku.rst | 3 ++- docs/deployment-on-pythonanywhere.rst | 3 ++- docs/settings.rst | 1 + {{cookiecutter.project_slug}}/app.json | 3 ++- {{cookiecutter.project_slug}}/config/settings/production.py | 1 + {{cookiecutter.project_slug}}/env.example | 3 ++- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 8 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e614c84a9..30851f243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +##[2016-09-22] +### Added +- New setting MAILGUN_SENDER_DOMAIN to allow sending mail from any domain other than those registered with mailgun (@jangeador) + ##[2016-09-10] ### Changed - Use app registry instead of INSTALLED_APPS to discover celery tasks (@dhepper) diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index 5b9b4a2c4..843e230fb 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -27,9 +27,10 @@ You can either push the 'deploy' button in your generated README.rst or run thes heroku config:set DJANGO_MAILGUN_SERVER_NAME=YOUR_MALGUN_SERVER heroku config:set DJANGO_MAILGUN_API_KEY=YOUR_MAILGUN_API_KEY + heroku config:set MAILGUN_SENDER_DOMAIN=YOUR_MAILGUN_SENDER_DOMAIN heroku config:set PYTHONHASHSEED=random - heroku config:set DJANGO_ADMIN_URL=\^somelocation/ + heroku config:set DJANGO_ADMIN_URL=\^somelocation/ git push heroku master heroku run python manage.py migrate diff --git a/docs/deployment-on-pythonanywhere.rst b/docs/deployment-on-pythonanywhere.rst index 6aacba154..82399eb15 100644 --- a/docs/deployment-on-pythonanywhere.rst +++ b/docs/deployment-on-pythonanywhere.rst @@ -69,6 +69,7 @@ Add these exports export DJANGO_ADMIN_URL='' export DJANGO_MAILGUN_API_KEY='' export DJANGO_MAILGUN_SERVER_NAME='' + export MAILGUN_SENDER_DOMAIN='' export DJANGO_AWS_ACCESS_KEY_ID= export DJANGO_AWS_SECRET_ACCESS_KEY= export DJANGO_AWS_STORAGE_BUCKET_NAME= @@ -84,7 +85,7 @@ Go to the PythonAnywhere **Databases tab** and configure your database. * For Postgres, setup your superuser password, then open a Postgres console and run a `CREATE DATABASE my-db-name`. You should probably also set up a specific role and permissions for your app, rather than using the superuser credentials. Make a note of the address and port of your postgres server. -* For MySQL, set the password and create a database. More info here: https://help.pythonanywhere.com/pages/UsingMySQL +* For MySQL, set the password and create a database. More info here: https://help.pythonanywhere.com/pages/UsingMySQL * You can also use sqlite if you like! Not recommended for anything beyond toy projects though. diff --git a/docs/settings.rst b/docs/settings.rst index 768ff6182..eb6e92a45 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -40,6 +40,7 @@ DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error DJANGO_MAILGUN_SERVER_NAME MAILGUN_SERVER_NAME n/a raises error +MAILGUN_SENDER_DOMAIN MAILGUN_SENDER_DOMAIN n/a raises error NEW_RELIC_APP_NAME NEW_RELIC_APP_NAME n/a raises error NEW_RELIC_LICENSE_KEY NEW_RELIC_LICENSE_KEY n/a raises error DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a raises error diff --git a/{{cookiecutter.project_slug}}/app.json b/{{cookiecutter.project_slug}}/app.json index 96ab574f4..10d2c9266 100644 --- a/{{cookiecutter.project_slug}}/app.json +++ b/{{cookiecutter.project_slug}}/app.json @@ -20,7 +20,8 @@ "DJANGO_AWS_SECRET_ACCESS_KEY": "", "DJANGO_AWS_STORAGE_BUCKET_NAME": "", "DJANGO_MAILGUN_SERVER_NAME": "", - "DJANGO_MAILGUN_API_KEY": ""{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}, + "DJANGO_MAILGUN_API_KEY": "" + "MAILGUN_SENDER_DOMAIN": ""{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}, "DJANGO_SENTRY_DSN": ""{%- endif %} }, "scripts": { diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 04a9426fd..c46132a33 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -163,6 +163,7 @@ SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL) INSTALLED_APPS += ("anymail", ) ANYMAIL = { "MAILGUN_API_KEY": env('DJANGO_MAILGUN_API_KEY'), + "MAILGUN_SENDER_DOMAIN": env('MAILGUN_SENDER_DOMAIN') } EMAIL_BACKEND = "anymail.backends.mailgun.MailgunBackend" diff --git a/{{cookiecutter.project_slug}}/env.example b/{{cookiecutter.project_slug}}/env.example index 95a6a1d96..b634a49db 100644 --- a/{{cookiecutter.project_slug}}/env.example +++ b/{{cookiecutter.project_slug}}/env.example @@ -16,6 +16,7 @@ DJANGO_AWS_STORAGE_BUCKET_NAME= # Used with email DJANGO_MAILGUN_API_KEY= DJANGO_SERVER_EMAIL= +MAILGUN_SENDER_DOMAIN= # Security! Better to use DNS for this task, but you can use redirect DJANGO_SECURE_SSL_REDIRECT=False @@ -33,4 +34,4 @@ DJANGO_OPBEAT_SECRET_TOKEN {% endif %} {% if cookiecutter.use_compressor == 'y' -%} COMPRESS_ENABLED= -{% endif %} \ No newline at end of file +{% endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 247bbb33c..88300ff7d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,7 +24,7 @@ Collectfast==0.2.3 # Email backends for Mailgun, Postmark, SendGrid and more # ------------------------------------------------------- -django-anymail==0.4.2 +django-anymail==0.5 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client From 52c0e071da694ecae7dc8d42c5414c6a7ad30b8d Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 18:21:00 -0700 Subject: [PATCH 003/280] Add Experimental AWS Elastic Beanstalk support (#817) Includes: * First pass at Elastic Beanstalk integration * Gets code and elasticache working * Very rudimentary documentation * Includes post hook cleanup --- README.rst | 2 + cookiecutter.json | 3 +- docs/deployment-with-elastic-beanstalk.rst | 54 +++++++++++++++++++ docs/index.rst | 1 + hooks/post_gen_project.py | 26 +++++++-- .../.ebextensions/10_packages.config | 5 ++ .../.ebextensions/20_elasticcache.config | 46 ++++++++++++++++ .../.ebextensions/30_options.config | 6 +++ .../.ebextensions/40_python.config | 17 ++++++ {{cookiecutter.project_slug}}/README.rst | 10 ++++ .../config/settings/production.py | 25 ++++++++- {{cookiecutter.project_slug}}/ebsetenv.py | 31 +++++++++++ {{cookiecutter.project_slug}}/env.example | 3 +- 13 files changed, 223 insertions(+), 6 deletions(-) create mode 100644 docs/deployment-with-elastic-beanstalk.rst create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/10_packages.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/30_options.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/40_python.config create mode 100644 {{cookiecutter.project_slug}}/ebsetenv.py diff --git a/README.rst b/README.rst index a0aa50778..b129a2156 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,7 @@ Features * Works with Python 2.7.x or 3.5.x * Run tests with unittest or py.test * Customizable PostgreSQL version +* Experimental support for Amazon Elastic Beanstalk Optional Integrations @@ -146,6 +147,7 @@ Answer the prompts with your own desired options_. For example:: 4 - Apache Software License 2.0 5 - Not open source Choose from 1, 2, 3, 4, 5 [1]: 1 + use_elasticbeanstalk_experimental: n Enter the project and take a look around:: diff --git a/cookiecutter.json b/cookiecutter.json index 9b9c67077..ababd56b7 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -21,5 +21,6 @@ "postgresql_version": ["9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], "use_lets_encrypt": "n", - "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] + "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"], + "use_elasticbeanstalk_experimental": "n" } diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst new file mode 100644 index 000000000..e88decfc0 --- /dev/null +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -0,0 +1,54 @@ +Deployment with Elastic Beanstalk +========================================== + +.. index:: Elastic Beanstalk + +Warning: Experimental +--------------------- + +This is experimental. For the time being there will be bugs and issues. If you've never used Elastic Beanstalk before, please hold off before trying this option. + +On the other hand, we need help cleaning this up. If you do have knowledge of Elastic Beanstalk, we would appreciate the help. :) + +Prerequisites +------------- + +* awsebcli + +Instructions +------------- + +``` +# creates the directory of environments (servers) +eb init -p python3.4 {{ cookiecutter.project_slug }} + +# Creates the environment (server) where the app will run +eb create {{ cookiecutter.project_slug }} +# Note: This will fail on a postgres error, because postgres doesn't exist yet + +# Make sure you are in the right environment +eb list + +# If you are not in the right environment +eb use {{ cookiecutter.project_slug }} + +# Set the environment variables +python ebsetenv.py + +# Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) +# Get some coffee, this is going to take a while + +# Deploy again +eb deploy + +# Take a look +eb open +``` + +FAQ +----- + +Why Not Use Docker on Elastic Beanstalk? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk). diff --git a/docs/index.rst b/docs/index.rst index 07cedc4ab..bfa88f18c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,6 +25,7 @@ Contents: faq troubleshooting my-favorite-cookie + deployment-with-elastic-beanstalk Indices and tables ================== diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index dd6a3f07d..0736c375d 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -115,7 +115,10 @@ def remove_heroku_files(): """ Removes files needed for heroku if it isn't going to be used """ - for filename in ["app.json", "Procfile", "requirements.txt", "runtime.txt"]: + filenames = ["app.json", "Procfile", "runtime.txt"] + if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': + filenames.append("requirements.txt") + for filename in ["app.json", "Procfile", "runtime.txt"]: file_name = os.path.join(PROJECT_DIRECTORY, filename) remove_file(file_name) @@ -179,6 +182,22 @@ def remove_copying_files(): PROJECT_DIRECTORY, filename )) +def remove_elasticbeanstalk(): + """ + Removes elastic beanstalk components + """ + docs_dir_location = os.path.join(PROJECT_DIRECTORY, '.ebextensions') + if os.path.exists(docs_dir_location): + shutil.rmtree(docs_dir_location) + + filenames = ["ebsetenv.py", ] + if '{{ cookiecutter.use_heroku }}'.lower() != 'y': + filenames.append("requirements.txt") + for filename in filenames: + os.remove(os.path.join( + PROJECT_DIRECTORY, filename + )) + # IN PROGRESS # def copy_doc_files(project_directory): # cookiecutters_dir = DEFAULT_CONFIG['cookiecutters_dir'] @@ -258,5 +277,6 @@ if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use if '{{ cookiecutter.open_source_license}}' != 'GPLv3': remove_copying_files() -# 4. Copy files from /docs/ to {{ cookiecutter.project_slug }}/docs/ -# copy_doc_files(PROJECT_DIRECTORY) +# 12. Remove Elastic Beanstalk files +if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': + remove_elasticbeanstalk() diff --git a/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config new file mode 100644 index 000000000..c0774efae --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config @@ -0,0 +1,5 @@ +packages: + yum: + git: [] + postgresql94-devel: [] + libjpeg-turbo-devel: [] diff --git a/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config b/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config new file mode 100644 index 000000000..539f55094 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config @@ -0,0 +1,46 @@ +#This sample requires you to create a separate configuration file that defines the custom +# option settings for CacheCluster properties. + +Resources: + MyCacheSecurityGroup: + Type: "AWS::EC2::SecurityGroup" + Properties: + GroupDescription: "Lock cache down to webserver access only" + SecurityGroupIngress : + - IpProtocol : "tcp" + FromPort : + Fn::GetOptionSetting: + OptionName : "CachePort" + DefaultValue: "6379" + ToPort : + Fn::GetOptionSetting: + OptionName : "CachePort" + DefaultValue: "6379" + SourceSecurityGroupName: + Ref: "AWSEBSecurityGroup" + MyElastiCache: + Type: "AWS::ElastiCache::CacheCluster" + Properties: + CacheNodeType: + Fn::GetOptionSetting: + OptionName : "CacheNodeType" + DefaultValue : "cache.t1.micro" + NumCacheNodes: + Fn::GetOptionSetting: + OptionName : "NumCacheNodes" + DefaultValue : "1" + Engine: + Fn::GetOptionSetting: + OptionName : "Engine" + DefaultValue : "redis" + VpcSecurityGroupIds: + - + Fn::GetAtt: + - MyCacheSecurityGroup + - GroupId + +Outputs: + ElastiCache: + Description : "ID of ElastiCache Cache Cluster with Redis Engine" + Value : + Ref : "MyElastiCache" diff --git a/{{cookiecutter.project_slug}}/.ebextensions/30_options.config b/{{cookiecutter.project_slug}}/.ebextensions/30_options.config new file mode 100644 index 000000000..d7135c3f9 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/30_options.config @@ -0,0 +1,6 @@ +option_settings: + "aws:elasticbeanstalk:customoption": + CacheNodeType : cache.t1.micro + NumCacheNodes : 1 + Engine : redis + CachePort : 6379 diff --git a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config new file mode 100644 index 000000000..02636e1ad --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config @@ -0,0 +1,17 @@ +container_commands: + 01_migrate: + command: "source /opt/python/run/venv/bin/activate && python manage.py migrate" + leader_only: True + 02_collectstatic: + command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput" +option_settings: + "aws:elasticbeanstalk:application:environment": + DJANGO_SETTINGS_MODULE: "config.settings.production" + REDIS_ENDPOINT_ADDRESS: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Address"]}`' + REDIS_PORT: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Port"]}`' + "aws:elasticbeanstalk:container:python": + WSGIPath: "config/wsgi.py" + NumProcesses: 3 + NumThreads: 20 + "aws:elasticbeanstalk:container:python:staticfiles": + "/static/": "www/static/" diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index f760a1e2c..b248a2c3d 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -138,3 +138,13 @@ See detailed `cookiecutter-django Docker documentation`_. .. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html {% endif %} +{% if cookiecutter.use_elasticbeanstalk_experimental %} + +Elastic Beanstalk +~~~~~~~~~~~~~~~~~~ + +See detailed `cookiecutter-django Elastic Beanstalk documentation`_. + +.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html + +{% endif %} diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 04a9426fd..85edea053 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -177,16 +177,39 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [ # DATABASE CONFIGURATION # ------------------------------------------------------------------------------ +{% if cookiecutter.use_elasticbeanstalk_experimental -%} +# Uses Amazon RDS for database hosting, which doesn't follow the Heroku-style spec +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': env('RDS_DB_NAME'), + 'USER': env('RDS_USERNAME'), + 'PASSWORD': env('RDS_PASSWORD'), + 'HOST': env('RDS_HOSTNAME'), + 'PORT': env('RDS_PORT'), + } +} +{% else %} +# Use the Heroku-style specification # Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ DATABASES['default'] = env.db('DATABASE_URL') +{%- endif %} # CACHING # ------------------------------------------------------------------------------ +{% if cookiecutter.use_elasticbeanstalk_experimental -%} +REDIS_LOCATION = "redis://{}:{}/0".format( + env('REDIS_ENDPOINT_ADDRESS'), + env('REDIS_PORT') +) +{% else %} +REDIS_LOCATION = '{0}/{1}'.format(env('REDIS_URL', default='redis://127.0.0.1:6379'), 0) +{%- endif %} # Heroku URL does not pass the DB number, so we parse it in CACHES = { 'default': { 'BACKEND': 'django_redis.cache.RedisCache', - 'LOCATION': '{0}/{1}'.format(env('REDIS_URL', default='redis://127.0.0.1:6379'), 0), + 'LOCATION': REDIS_LOCATION, 'OPTIONS': { 'CLIENT_CLASS': 'django_redis.client.DefaultClient', 'IGNORE_EXCEPTIONS': True, # mimics memcache behavior. diff --git a/{{cookiecutter.project_slug}}/ebsetenv.py b/{{cookiecutter.project_slug}}/ebsetenv.py new file mode 100644 index 000000000..fbb8dc2d8 --- /dev/null +++ b/{{cookiecutter.project_slug}}/ebsetenv.py @@ -0,0 +1,31 @@ +"""Converts a .env file to Elastic Beanstalk environment variables""" + +from sys import exit +from subprocess import check_call + +try: + import dotenv +except ImportError: + print("Please install the 'dotenv' library: 'pip install dotenv'") + exit() + +def main(): + command = ['eb', 'setenv'] + failures = [] + for key, value in dotenv.Dotenv('.env').items(): + if key.startswith('POSTGRES'): + continue + if value: + command.append("{}={}".format(key, value)) + else: + failures.append(key) + if failures: + for failure in failures: + print("{} requires a value".format(failure)) + else: + print(' '.join(command)) + check_call(command) + + +if __name__ == '__main__': + main() diff --git a/{{cookiecutter.project_slug}}/env.example b/{{cookiecutter.project_slug}}/env.example index 95a6a1d96..356e9c4ec 100644 --- a/{{cookiecutter.project_slug}}/env.example +++ b/{{cookiecutter.project_slug}}/env.example @@ -1,3 +1,4 @@ + # PostgreSQL POSTGRES_PASSWORD=mysecretpass POSTGRES_USER=postgresuser @@ -33,4 +34,4 @@ DJANGO_OPBEAT_SECRET_TOKEN {% endif %} {% if cookiecutter.use_compressor == 'y' -%} COMPRESS_ENABLED= -{% endif %} \ No newline at end of file +{% endif %} From aa13371395e668267a33183a68140980a6b7624c Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 18:32:56 -0700 Subject: [PATCH 004/280] Fix FAQ --- docs/deployment-with-elastic-beanstalk.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index e88decfc0..fb57607fb 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -51,4 +51,4 @@ FAQ Why Not Use Docker on Elastic Beanstalk? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk). +Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). From 31d90afb33c0edcdd75c61e24c5f07db4b92a369 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 21:45:16 -0700 Subject: [PATCH 005/280] Fix markup --- docs/deployment-with-elastic-beanstalk.rst | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index fb57607fb..ae3f41a59 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -18,32 +18,32 @@ Prerequisites Instructions ------------- -``` -# creates the directory of environments (servers) -eb init -p python3.4 {{ cookiecutter.project_slug }} +:: -# Creates the environment (server) where the app will run -eb create {{ cookiecutter.project_slug }} -# Note: This will fail on a postgres error, because postgres doesn't exist yet + # creates the directory of environments (servers) + eb init -p python3.4 {{ cookiecutter.project_slug }} -# Make sure you are in the right environment -eb list + # Creates the environment (server) where the app will run + eb create {{ cookiecutter.project_slug }} + # Note: This will fail on a postgres error, because postgres doesn't exist yet -# If you are not in the right environment -eb use {{ cookiecutter.project_slug }} + # Make sure you are in the right environment + eb list -# Set the environment variables -python ebsetenv.py + # If you are not in the right environment + eb use {{ cookiecutter.project_slug }} -# Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) -# Get some coffee, this is going to take a while + # Set the environment variables + python ebsetenv.py -# Deploy again -eb deploy + # Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) + # Get some coffee, this is going to take a while -# Take a look -eb open -``` + # Deploy again + eb deploy + + # Take a look + eb open FAQ ----- @@ -51,4 +51,4 @@ FAQ Why Not Use Docker on Elastic Beanstalk? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). +Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). From d084d98d1765483f7d6604a96d71f4d6e74b9625 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 23 Sep 2016 17:14:17 -0700 Subject: [PATCH 006/280] A little cleanup of the EB docs --- docs/deployment-with-elastic-beanstalk.rst | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index ae3f41a59..5074770f0 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -18,18 +18,28 @@ Prerequisites Instructions ------------- +If you haven't done so, create a directory of environments. + :: - # creates the directory of environments (servers) eb init -p python3.4 {{ cookiecutter.project_slug }} - # Creates the environment (server) where the app will run - eb create {{ cookiecutter.project_slug }} - # Note: This will fail on a postgres error, because postgres doesn't exist yet - # Make sure you are in the right environment +Once that is done, create the environment (server) where the app will run + +:: + + eb create {{ cookiecutter.project_slug }} + # Note: This will eventually fail on a postgres error, because postgres doesn't exist yet + +Now make sure you are in the right environment + +:: + eb list +TODO: Finsh it:: + # If you are not in the right environment eb use {{ cookiecutter.project_slug }} From 010a1b0a9411ce92005a917d6b31e703964d0b3f Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 26 Sep 2016 09:19:15 -0700 Subject: [PATCH 007/280] Made Elastic Beanstalk support incompatible with Docker and Heroku --- cookiecutter.json | 4 ++-- hooks/pre_gen_project.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index ababd56b7..bf729b678 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -17,10 +17,10 @@ "use_python3": "y", "use_docker": "y", "use_heroku": "n", + "use_elasticbeanstalk_experimental": "n", "use_compressor": "n", "postgresql_version": ["9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], "use_lets_encrypt": "n", - "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"], - "use_elasticbeanstalk_experimental": "n" + "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] } diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 9cd168bce..cd31774e0 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -3,4 +3,9 @@ project_slug = '{{ cookiecutter.project_slug }}' if hasattr(project_slug, 'isidentifier'): assert project_slug.isidentifier(), 'Project slug should be valid Python identifier!' +elasticbeanstalk = '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() +heroku = '{{ cookiecutter.use_heroku }}'.lower() +docker = '{{ cookiecutter.use_docker }}'.lower() +if elasticbeanstalk == 'y' and (heroku == 'y' or docker == 'y'): + raise Exception("Cookiecutter Django's EXPERIMENTAL Elastic Beanstalk support is incompatible with Heroku and Docker setups.") From f5814c533722673c20c55bd0c0aaa3ad44610421 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 26 Sep 2016 09:28:35 -0700 Subject: [PATCH 008/280] Now includes message for missing .env file. Fixed #819 --- {{cookiecutter.project_slug}}/ebsetenv.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/{{cookiecutter.project_slug}}/ebsetenv.py b/{{cookiecutter.project_slug}}/ebsetenv.py index fbb8dc2d8..ba9652db7 100644 --- a/{{cookiecutter.project_slug}}/ebsetenv.py +++ b/{{cookiecutter.project_slug}}/ebsetenv.py @@ -1,5 +1,6 @@ """Converts a .env file to Elastic Beanstalk environment variables""" +import os from sys import exit from subprocess import check_call @@ -10,10 +11,15 @@ except ImportError: exit() def main(): + if not os.path.exists('.env'): + print('ERROR!! .env file is missing!') + print("Please copy 'env.example' to '.env' and add appropriate values") + exit() command = ['eb', 'setenv'] failures = [] for key, value in dotenv.Dotenv('.env').items(): if key.startswith('POSTGRES'): + print('Skipping POSTGRES values - Amazon RDS provides these') continue if value: command.append("{}={}".format(key, value)) From d8957877df3de7eac0a2b9eed3c50070a8e3d63e Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 26 Sep 2016 10:23:45 -0700 Subject: [PATCH 009/280] FAQ entry on combining multiple deployment options --- docs/deployment-with-elastic-beanstalk.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index 5074770f0..54c32fecd 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -62,3 +62,8 @@ Why Not Use Docker on Elastic Beanstalk? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). + +Why Can't I Use Both Docker/Heroku with Elastic Beanstalk? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Because the environment variables that our Docker and Heroku setups use for PostgreSQL access is different then how Amazon RDS handles this access. At this time we're just trying to get things to work reliably with Elastic Beanstalk, and full integration will come later. From 8cfd41ac27277616b9dc247d1121d89db23d8553 Mon Sep 17 00:00:00 2001 From: Keith Webber Date: Mon, 26 Sep 2016 18:22:19 -0400 Subject: [PATCH 010/280] update readme to point to cookiecutter>=1.4 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b129a2156..d3efd3384 100644 --- a/README.rst +++ b/README.rst @@ -90,7 +90,7 @@ and then editing the results to include your name, email, and various configurat First, get Cookiecutter. Trust me, it's awesome:: - $ pip install cookiecutter + $ pip install "cookiecutter>=1.4.0" Now run it against this repo:: From 404de4254bff756c412cc0c4567adb6b7b71b676 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 28 Sep 2016 16:42:02 -0700 Subject: [PATCH 011/280] Fix elastic beanstalk checks --- {{cookiecutter.project_slug}}/README.rst | 6 +++--- {{cookiecutter.project_slug}}/config/settings/production.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index b248a2c3d..e06a85ba3 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -117,7 +117,7 @@ Deployment ---------- The following details how to deploy this application. -{% if cookiecutter.use_heroku == "y" %} +{% if cookiecutter.use_heroku.lower() == "y" %} Heroku ^^^^^^ @@ -129,7 +129,7 @@ See detailed `cookiecutter-django Heroku documentation`_. .. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html {% endif %} -{% if cookiecutter.use_docker == "y" %} +{% if cookiecutter.use_docker.lower() == "y" %} Docker ^^^^^^ @@ -138,7 +138,7 @@ See detailed `cookiecutter-django Docker documentation`_. .. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html {% endif %} -{% if cookiecutter.use_elasticbeanstalk_experimental %} +{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' %} Elastic Beanstalk ~~~~~~~~~~~~~~~~~~ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 85edea053..ebfcc765b 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -177,7 +177,7 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [ # DATABASE CONFIGURATION # ------------------------------------------------------------------------------ -{% if cookiecutter.use_elasticbeanstalk_experimental -%} +{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} # Uses Amazon RDS for database hosting, which doesn't follow the Heroku-style spec DATABASES = { 'default': { @@ -197,7 +197,7 @@ DATABASES['default'] = env.db('DATABASE_URL') # CACHING # ------------------------------------------------------------------------------ -{% if cookiecutter.use_elasticbeanstalk_experimental -%} +{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} REDIS_LOCATION = "redis://{}:{}/0".format( env('REDIS_ENDPOINT_ADDRESS'), env('REDIS_PORT') From 5a870dfd325612eba05bbe6342c5f501163b04c4 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 00:14:11 -0300 Subject: [PATCH 012/280] Bump for 1.9.9-05 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 35685f3bc..30df6fdd1 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = '1.9.9-04' +version = '1.9.9-05' if sys.argv[-1] == 'tag': os.system('git tag -a %s -m "version %s"' % (version, version)) From 946b84907c01c583acacce05e4482debf736264c Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:28:33 -0300 Subject: [PATCH 013/280] rename MIDDLEWARE_CLASSES to MIDDLEWARE --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- {{cookiecutter.project_slug}}/config/settings/local.py | 2 +- .../config/settings/production.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index c9433416c..ef2d53b3a 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -53,7 +53,7 @@ INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS # MIDDLEWARE CONFIGURATION # ------------------------------------------------------------------------------ -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index e6fd99f83..c72d3af11 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -50,7 +50,7 @@ CACHES = { # django-debug-toolbar # ------------------------------------------------------------------------------ -MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) +MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',) INSTALLED_APPS += ('debug_toolbar', ) INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ] diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index ebfcc765b..4df16821e 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -42,11 +42,11 @@ INSTALLED_APPS += ('raven.contrib.django.raven_compat', ) # Use Whitenoise to serve static files # See: https://whitenoise.readthedocs.io/ WHITENOISE_MIDDLEWARE = ('whitenoise.middleware.WhiteNoiseMiddleware', ) -MIDDLEWARE_CLASSES = WHITENOISE_MIDDLEWARE + MIDDLEWARE_CLASSES +MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE {% endif %} {%- if cookiecutter.use_sentry_for_error_reporting == 'y' -%} RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware', ) -MIDDLEWARE_CLASSES = RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES +MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE {% endif %} {%- if cookiecutter.use_opbeat == 'y' -%} # opbeat integration @@ -57,9 +57,9 @@ OPBEAT = { 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') } -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', -) + MIDDLEWARE_CLASSES +) + MIDDLEWARE {% endif %} # SECURITY CONFIGURATION From 530487b59a826a6661d898807b09bd47726bbb3e Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:37:57 -0300 Subject: [PATCH 014/280] add default AUTH_PASSWORD_VALIDATORS --- .../config/settings/common.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index ef2d53b3a..04998575f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -200,6 +200,26 @@ ROOT_URLCONF = 'config.urls' # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application WSGI_APPLICATION = 'config.wsgi.application' + +# PASSWORD VALIDATION +# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators +# ------------------------------------------------------------------------------ + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + # AUTHENTICATION CONFIGURATION # ------------------------------------------------------------------------------ AUTHENTICATION_BACKENDS = ( From 28f1816ed4b45c9d52383fc6747555d0f79bc40b Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:41:48 -0300 Subject: [PATCH 015/280] use manage.py from django 1.10 --- {{cookiecutter.project_slug}}/manage.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/manage.py b/{{cookiecutter.project_slug}}/manage.py index b41522c7d..86d03b318 100755 --- a/{{cookiecutter.project_slug}}/manage.py +++ b/{{cookiecutter.project_slug}}/manage.py @@ -5,6 +5,19 @@ import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') - from django.core.management import execute_from_command_line - + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise execute_from_command_line(sys.argv) From 32169f0cbf90b4b40f84faa89240ec1705f69ae8 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:56:48 -0300 Subject: [PATCH 016/280] ignore F401 error on manage.py --- {{cookiecutter.project_slug}}/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/manage.py b/{{cookiecutter.project_slug}}/manage.py index 86d03b318..9de71376f 100755 --- a/{{cookiecutter.project_slug}}/manage.py +++ b/{{cookiecutter.project_slug}}/manage.py @@ -12,7 +12,7 @@ if __name__ == '__main__': # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: - import django + import django # noqa except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and " From 5a64696af181fb7c7f151b8456938192bfed94e6 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:59:26 -0300 Subject: [PATCH 017/280] update django to 1.10.1 --- setup.py | 4 ++-- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 30df6fdd1..a20a28b2b 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = '1.9.9-05' +version = '1.10.1' if sys.argv[-1] == 'tag': os.system('git tag -a %s -m "version %s"' % (version, version)) @@ -34,7 +34,7 @@ setup( classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', - 'Framework :: Django :: 1.9', + 'Framework :: Django :: 1.10', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index fcc10ba24..13378d8fa 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.9.9 +django==1.10.1 # Configuration django-environ==0.4.0 From d556f3cc5fde9de3727dc8952e9beac25a09e7d2 Mon Sep 17 00:00:00 2001 From: Steve Steiner Date: Thu, 15 Sep 2016 12:40:15 -0400 Subject: [PATCH 018/280] Make test_docker.sh tests pass by passing new password auth rules --- tests/test_cookiecutter_generation.py | 0 tests/test_docker.sh | 0 .../users/tests/test_admin.py | 10 +++++----- 3 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 tests/test_cookiecutter_generation.py mode change 100644 => 100755 tests/test_docker.sh diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py old mode 100644 new mode 100755 diff --git a/tests/test_docker.sh b/tests/test_docker.sh old mode 100644 new mode 100755 diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py index 10b07b749..a1ff0b846 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py @@ -6,14 +6,14 @@ from ..admin import MyUserCreationForm class TestMyUserCreationForm(TestCase): def setUp(self): - self.user = self.make_user() + self.user = self.make_user('notalamode', 'notalamodespassword') def test_clean_username_success(self): # Instantiate the form with a new username form = MyUserCreationForm({ 'username': 'alamode', - 'password1': '123456', - 'password2': '123456', + 'password1': '7jefB#f@Cc7YJB]2v', + 'password2': '7jefB#f@Cc7YJB]2v', }) # Run is_valid() to trigger the validation valid = form.is_valid() @@ -27,8 +27,8 @@ class TestMyUserCreationForm(TestCase): # Instantiate the form with the same username as self.user form = MyUserCreationForm({ 'username': self.user.username, - 'password1': '123456', - 'password2': '123456', + 'password1': 'notalamodespassword', + 'password2': 'notalamodespassword', }) # Run is_valid() to trigger the validation, which is going to fail # because the username is already taken From 791b2f5cc23ec7a74526a20df29c0cbd3e9fa56d Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 20 Sep 2016 19:03:35 -0300 Subject: [PATCH 019/280] update frontend dependencies --- .../templates/base.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 3518fe6e7..94f9ef9f5 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -14,8 +14,8 @@ {% block css %} - - + + {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %} @@ -89,10 +89,10 @@ ================================================== --> {% block javascript %} - - - - + + + + From 34b84f2f2cd7ac0748ad2222bcb0e5e0fe321d11 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 20 Sep 2016 19:05:36 -0300 Subject: [PATCH 020/280] change 'admin' url, to stay the same as generated by django 1.10 https://github.com/django/django/blob/1.10.1/django/conf/project_template/project_name/urls.py-tpl#L20 --- {{cookiecutter.project_slug}}/config/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/urls.py b/{{cookiecutter.project_slug}}/config/urls.py index f3a621127..cbb977ff0 100644 --- a/{{cookiecutter.project_slug}}/config/urls.py +++ b/{{cookiecutter.project_slug}}/config/urls.py @@ -13,7 +13,7 @@ urlpatterns = [ url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name='about'), # Django Admin, use {% raw %}{% url 'admin:index' %}{% endraw %} - url(settings.ADMIN_URL, include(admin.site.urls)), + url(settings.ADMIN_URL, admin.site.urls), # User management url(r'^users/', include('{{ cookiecutter.project_slug }}.users.urls', namespace='users')), From 774074488559d4ced0df9b82f7802dc17c1974f3 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 23 Sep 2016 01:28:27 -0300 Subject: [PATCH 021/280] sync migrations with django1.10 --- .../contrib/sites/migrations/0001_initial.py | 23 ++++++----- .../migrations/0002_alter_domain_unique.py | 23 +++++++++++ ...me.py => 0003_set_site_domain_and_name.py} | 2 +- .../users/migrations/0001_initial.py | 39 ++++++++++--------- 4 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py rename {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/{0002_set_site_domain_and_name.py => 0003_set_site_domain_and_name.py} (96%) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py index 555d02c42..b1803682a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py @@ -1,31 +1,34 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations import django.contrib.sites.models +from django.contrib.sites.models import _simple_domain_name_validator +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ] + dependencies = [] operations = [ migrations.CreateModel( name='Site', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), - ('domain', models.CharField(verbose_name='domain name', max_length=100, validators=[django.contrib.sites.models._simple_domain_name_validator])), - ('name', models.CharField(verbose_name='display name', max_length=50)), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('domain', models.CharField( + max_length=100, verbose_name='domain name', validators=[_simple_domain_name_validator] + )), + ('name', models.CharField(max_length=50, verbose_name='display name')), ], options={ - 'verbose_name_plural': 'sites', - 'verbose_name': 'site', - 'db_table': 'django_site', 'ordering': ('domain',), + 'db_table': 'django_site', + 'verbose_name': 'site', + 'verbose_name_plural': 'sites', }, + bases=(models.Model,), managers=[ - (b'objects', django.contrib.sites.models.SiteManager()), + ('objects', django.contrib.sites.models.SiteManager()), ], ), ] diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py new file mode 100644 index 000000000..468718cde --- /dev/null +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +import django.contrib.sites.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sites', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='site', + name='domain', + field=models.CharField( + max_length=100, unique=True, validators=[django.contrib.sites.models._simple_domain_name_validator], + verbose_name='domain name' + ), + ), + ] diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_set_site_domain_and_name.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py similarity index 96% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_set_site_domain_and_name.py rename to {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py index e6292f0b0..348989e13 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_set_site_domain_and_name.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -38,7 +38,7 @@ def update_site_backward(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('sites', '0001_initial'), + ('sites', '0002_alter_domain_unique'), ] operations = [ diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py index 8327d2890..626e10f3d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py @@ -1,44 +1,47 @@ # -*- coding: utf-8 -*- +# Generated by Django 1.9.9 on 2016-09-23 04:10 from __future__ import unicode_literals -from django.db import models, migrations -import django.utils.timezone import django.contrib.auth.models import django.core.validators +from django.db import migrations, models +import django.utils.timezone class Migration(migrations.Migration): + initial = True + dependencies = [ - ('auth', '0006_require_contenttypes_0002'), + ('auth', '0007_alter_validators_add_error_messages'), ] operations = [ migrations.CreateModel( name='User', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), - ('last_login', models.DateTimeField(null=True, verbose_name='last login', blank=True)), - ('is_superuser', models.BooleanField(help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status', default=False)), - ('username', models.CharField(max_length=30, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], verbose_name='username', error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True)), - ('first_name', models.CharField(max_length=30, verbose_name='first name', blank=True)), - ('last_name', models.CharField(max_length=30, verbose_name='last name', blank=True)), - ('email', models.EmailField(max_length=254, verbose_name='email address', blank=True)), - ('is_staff', models.BooleanField(help_text='Designates whether the user can log into this admin site.', verbose_name='staff status', default=False)), - ('is_active', models.BooleanField(help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active', default=True)), - ('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)), - ('groups', models.ManyToManyField(related_name='user_set', blank=True, verbose_name='groups', to='auth.Group', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_query_name='user')), - ('user_permissions', models.ManyToManyField(related_name='user_set', blank=True, verbose_name='user permissions', to='auth.Permission', help_text='Specific permissions for this user.', related_query_name='user')), - ('name', models.CharField(max_length=255, verbose_name='Name of User', blank=True)), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), + ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('name', models.CharField(blank=True, max_length=255, verbose_name='Name of User')), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ - 'verbose_name': 'user', 'abstract': False, + 'verbose_name': 'user', 'verbose_name_plural': 'users', }, managers=[ - (b'objects', django.contrib.auth.models.UserManager()), + ('objects', django.contrib.auth.models.UserManager()), ], ), ] From 9008ba5425f47d22f6295516466983d502f137f9 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 23 Sep 2016 01:29:10 -0300 Subject: [PATCH 022/280] fix documentation about contrib/sites migrations --- docs/faq.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 854e9dddd..def4ba1f9 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -8,9 +8,9 @@ Why is there a django.contrib.sites directory in Cookiecutter Django? It is there to add a migration so you don't have to manually change the ``sites.Site`` record from ``example.com`` to whatever your domain is. Instead, your ``{{cookiecutter.domain_name}}`` and {{cookiecutter.project_name}} value is placed by **Cookiecutter** in the domain and name fields respectively. -See `0002_set_site_domain_and_name.py`_. +See `0003_set_site_domain_and_name.py`_. -.. _`0002_set_site_domain_and_name.py`: https://github.com/pydanny/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/contrib/sites/migrations/0002_set_site_domain_and_name.py +.. _`0003_set_site_domain_and_name.py`: https://github.com/pydanny/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/contrib/sites/migrations/0003_set_site_domain_and_name.py Why aren't you using just one configuration file (12-Factor App) From 0ea6153b00f5cd5fe9288ec62b14a944e92a7ed7 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 23 Sep 2016 01:32:41 -0300 Subject: [PATCH 023/280] removed django-autoslug until it's ready for 1.10 --- requirements_to_watch.txt | 2 ++ {{cookiecutter.project_slug}}/requirements/base.txt | 1 - .../users/migrations/0001_initial.py | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/requirements_to_watch.txt b/requirements_to_watch.txt index 3e25cb204..34f0fe621 100644 --- a/requirements_to_watch.txt +++ b/requirements_to_watch.txt @@ -1,2 +1,4 @@ # These requirements prevented an upgrade to Django 1.10. django-coverage-plugin==1.3.1 +django-autoslug==1.9.3 + diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 13378d8fa..df90ba070 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -40,7 +40,6 @@ psycopg2==2.6.2 # Unicode slugification awesome-slugify==1.6.5 -django-autoslug==1.9.3 # Time zones support pytz==2016.6.1 diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py index 626e10f3d..e76c333f0 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.9 on 2016-09-23 04:10 +# Generated by Django 1.10.1 on 2016-09-23 04:36 from __future__ import unicode_literals import django.contrib.auth.models -import django.core.validators +import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone @@ -13,7 +13,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('auth', '0007_alter_validators_add_error_messages'), + ('auth', '0008_alter_user_username_max_length'), ] operations = [ @@ -24,7 +24,7 @@ class Migration(migrations.Migration): ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), - ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), @@ -36,9 +36,9 @@ class Migration(migrations.Migration): ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ - 'abstract': False, - 'verbose_name': 'user', 'verbose_name_plural': 'users', + 'verbose_name': 'user', + 'abstract': False, }, managers=[ ('objects', django.contrib.auth.models.UserManager()), From c09a84b1be3f1b198ca3e2dfae577b2d4e65540d Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Wed, 28 Sep 2016 23:58:39 -0300 Subject: [PATCH 024/280] update django-redis and whitenoise version --- {{cookiecutter.project_slug}}/requirements/base.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index df90ba070..b2abd4ed9 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ django==1.10.1 # Configuration django-environ==0.4.0 {% if cookiecutter.use_whitenoise == 'y' -%} -whitenoise==3.2.1 +whitenoise==3.2.2 {%- endif %} @@ -45,8 +45,8 @@ awesome-slugify==1.6.5 pytz==2016.6.1 # Redis support -django-redis==4.4.4 -redis>=2.10.0 +django-redis==4.5.0 +redis>=2.10.5 {% if cookiecutter.use_celery == "y" %} celery==3.1.23 From fc770f1506970e620c10708a2764567bdafb55ba Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 01:07:40 -0300 Subject: [PATCH 025/280] update jquery to 3.1.1 --- .../{{cookiecutter.project_slug}}/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 94f9ef9f5..e816a208d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -90,7 +90,7 @@ {% block javascript %} - + From c8ddfbda5b06bc10c0d5d810f5270ec63f722198 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 01:08:24 -0300 Subject: [PATCH 026/280] update README and CHANGELOG --- CHANGELOG.md | 16 ++++++++++++++++ README.rst | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e614c84a9..14fa97d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +##[2016-09-28] +### Added +- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) +- Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) +### Changed +- Upgrade to Django 1.10.1 (@luzfcb) +- Upgrade django-model-utils to 2.6, django-redis to 4.5.0, redis to 2.10.5, Sphinx to 1.4.6, pytest-django to 3.0.0, django-anymail to 0.5, raven to 5.27.1 (@luzfcb) +- Upgrade to Bootstrap 4 Alpha 4, jQuery to 3.1.1, tether.js to 1.3.7 (@luzfcb) +- Update `manage.py` to use same code of `manage.py` from Django 1.10 (@luzfcb) +- Sync `sites` app migrations with django 1.10, and fix aditional migrations to `sites` and `user` app (@luzfcb) +d changed 'admin' url on `config/urls.py`, to stay the same as generated by django 1.10 (@luzfcb) +- Make test_docker.sh tests pass by passing new password auth rules (@ssteinerx) +### Removed +- Removed django-autoslug because not support django 1.10 at this date (@luzfcb) + + ##[2016-09-10] ### Changed - Use app registry instead of INSTALLED_APPS to discover celery tasks (@dhepper) diff --git a/README.rst b/README.rst index b129a2156..e9980f7b9 100644 --- a/README.rst +++ b/README.rst @@ -26,9 +26,9 @@ Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting pr Features --------- -* For Django 1.9 +* For Django 1.10 * Renders Django projects with 100% starting test coverage -* Twitter Bootstrap_ v4.0.0 - `alpha 3`_ +* Twitter Bootstrap_ v4.0.0 - `alpha 4`_ * 12-Factor_ based settings via django-environ_ * Optimized development and production settings * Registration via django-allauth_ @@ -56,7 +56,7 @@ Optional Integrations * Integration with Sentry_ for error logging * Integration with Opbeat_ for performance monitoring -.. _`alpha 3`: http://blog.getbootstrap.com/2016/07/27/bootstrap-4-alpha-3/ +.. _`alpha 4`: http://blog.getbootstrap.com/2016/09/05/bootstrap-4-alpha-4/ .. _Bootstrap: https://github.com/twbs/bootstrap .. _django-environ: https://github.com/joke2k/django-environ .. _12-Factor: http://12factor.net/ From fbe97519376e3cbdeb991bbb438b15b90e5e7fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 01:24:51 -0300 Subject: [PATCH 027/280] fix CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14fa97d54..eea0416fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) + ### Changed - Upgrade to Django 1.10.1 (@luzfcb) - Upgrade django-model-utils to 2.6, django-redis to 4.5.0, redis to 2.10.5, Sphinx to 1.4.6, pytest-django to 3.0.0, django-anymail to 0.5, raven to 5.27.1 (@luzfcb) @@ -14,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Sync `sites` app migrations with django 1.10, and fix aditional migrations to `sites` and `user` app (@luzfcb) d changed 'admin' url on `config/urls.py`, to stay the same as generated by django 1.10 (@luzfcb) - Make test_docker.sh tests pass by passing new password auth rules (@ssteinerx) + ### Removed - Removed django-autoslug because not support django 1.10 at this date (@luzfcb) From 06692c387a52bfc2a05663c1e8349405ecadce44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 01:25:15 -0300 Subject: [PATCH 028/280] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eea0416fa..b4604164a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -##[2016-09-28] +##[2016-09-29] ### Added - Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) From 1c0c9ff5104653eae7dfe0ae253b0c50aa29f544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 01:27:48 -0300 Subject: [PATCH 029/280] fix CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4604164a..a6ec79626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ##[2016-09-29] ### Added -- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) +- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See [Password Validation docs](https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation") (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) ### Changed From 6bc4b40476d0f704682d6d1b6e97fb89606b749c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:04 -0700 Subject: [PATCH 030/280] Update django-model-utils from 2.5.2 to 2.6 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index b2abd4ed9..0c983013a 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -21,7 +21,7 @@ django-braces==1.9.0 django-crispy-forms==1.6.0 # Models -django-model-utils==2.5.2 +django-model-utils==2.6 # Images Pillow==3.3.1 From 9cd029e675bff7419a8ab73328dda710126795e6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:13 -0700 Subject: [PATCH 031/280] Update raven from 5.27.0 to 5.27.1 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 247bbb33c..be1da20a7 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==0.4.2 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==5.27.0 +raven==5.27.1 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From cd2fbc8ff6ebebbfe751368516d5ead077935f16 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:53 -0700 Subject: [PATCH 032/280] Update pytest-django from 2.9.1 to 3.0.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index bc260ba51..7661a46a1 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,5 +12,5 @@ django-debug-toolbar==1.5 # improved REPL ipdb==0.10.1 -pytest-django==2.9.1 +pytest-django==3.0.0 pytest-sugar==0.7.1 From ab8af24cd992598668b83ee4e04be79ca18f19bf Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:54 -0700 Subject: [PATCH 033/280] Update pytest-django from 2.9.1 to 3.0.0 --- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index b607cbc54..42ed08c56 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -13,5 +13,5 @@ django-test-plus==1.0.15 factory_boy==2.7.0 # pytest -pytest-django==2.9.1 +pytest-django==3.0.0 pytest-sugar==0.7.1 From cac685d909c8e90f4489fa520a259ec07f9ace11 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 18:21:00 -0700 Subject: [PATCH 034/280] Add Experimental AWS Elastic Beanstalk support (#817) Includes: * First pass at Elastic Beanstalk integration * Gets code and elasticache working * Very rudimentary documentation * Includes post hook cleanup --- README.rst | 2 + cookiecutter.json | 3 +- docs/deployment-with-elastic-beanstalk.rst | 54 +++++++++++++++++++ docs/index.rst | 1 + hooks/post_gen_project.py | 26 +++++++-- .../.ebextensions/10_packages.config | 5 ++ .../.ebextensions/20_elasticcache.config | 46 ++++++++++++++++ .../.ebextensions/30_options.config | 6 +++ .../.ebextensions/40_python.config | 17 ++++++ {{cookiecutter.project_slug}}/README.rst | 10 ++++ .../config/settings/production.py | 25 ++++++++- {{cookiecutter.project_slug}}/ebsetenv.py | 31 +++++++++++ {{cookiecutter.project_slug}}/env.example | 1 + 13 files changed, 222 insertions(+), 5 deletions(-) create mode 100644 docs/deployment-with-elastic-beanstalk.rst create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/10_packages.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/30_options.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/40_python.config create mode 100644 {{cookiecutter.project_slug}}/ebsetenv.py diff --git a/README.rst b/README.rst index a0aa50778..b129a2156 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,7 @@ Features * Works with Python 2.7.x or 3.5.x * Run tests with unittest or py.test * Customizable PostgreSQL version +* Experimental support for Amazon Elastic Beanstalk Optional Integrations @@ -146,6 +147,7 @@ Answer the prompts with your own desired options_. For example:: 4 - Apache Software License 2.0 5 - Not open source Choose from 1, 2, 3, 4, 5 [1]: 1 + use_elasticbeanstalk_experimental: n Enter the project and take a look around:: diff --git a/cookiecutter.json b/cookiecutter.json index 9b9c67077..ababd56b7 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -21,5 +21,6 @@ "postgresql_version": ["9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], "use_lets_encrypt": "n", - "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] + "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"], + "use_elasticbeanstalk_experimental": "n" } diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst new file mode 100644 index 000000000..e88decfc0 --- /dev/null +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -0,0 +1,54 @@ +Deployment with Elastic Beanstalk +========================================== + +.. index:: Elastic Beanstalk + +Warning: Experimental +--------------------- + +This is experimental. For the time being there will be bugs and issues. If you've never used Elastic Beanstalk before, please hold off before trying this option. + +On the other hand, we need help cleaning this up. If you do have knowledge of Elastic Beanstalk, we would appreciate the help. :) + +Prerequisites +------------- + +* awsebcli + +Instructions +------------- + +``` +# creates the directory of environments (servers) +eb init -p python3.4 {{ cookiecutter.project_slug }} + +# Creates the environment (server) where the app will run +eb create {{ cookiecutter.project_slug }} +# Note: This will fail on a postgres error, because postgres doesn't exist yet + +# Make sure you are in the right environment +eb list + +# If you are not in the right environment +eb use {{ cookiecutter.project_slug }} + +# Set the environment variables +python ebsetenv.py + +# Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) +# Get some coffee, this is going to take a while + +# Deploy again +eb deploy + +# Take a look +eb open +``` + +FAQ +----- + +Why Not Use Docker on Elastic Beanstalk? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk). diff --git a/docs/index.rst b/docs/index.rst index 07cedc4ab..bfa88f18c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,6 +25,7 @@ Contents: faq troubleshooting my-favorite-cookie + deployment-with-elastic-beanstalk Indices and tables ================== diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index dd6a3f07d..0736c375d 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -115,7 +115,10 @@ def remove_heroku_files(): """ Removes files needed for heroku if it isn't going to be used """ - for filename in ["app.json", "Procfile", "requirements.txt", "runtime.txt"]: + filenames = ["app.json", "Procfile", "runtime.txt"] + if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': + filenames.append("requirements.txt") + for filename in ["app.json", "Procfile", "runtime.txt"]: file_name = os.path.join(PROJECT_DIRECTORY, filename) remove_file(file_name) @@ -179,6 +182,22 @@ def remove_copying_files(): PROJECT_DIRECTORY, filename )) +def remove_elasticbeanstalk(): + """ + Removes elastic beanstalk components + """ + docs_dir_location = os.path.join(PROJECT_DIRECTORY, '.ebextensions') + if os.path.exists(docs_dir_location): + shutil.rmtree(docs_dir_location) + + filenames = ["ebsetenv.py", ] + if '{{ cookiecutter.use_heroku }}'.lower() != 'y': + filenames.append("requirements.txt") + for filename in filenames: + os.remove(os.path.join( + PROJECT_DIRECTORY, filename + )) + # IN PROGRESS # def copy_doc_files(project_directory): # cookiecutters_dir = DEFAULT_CONFIG['cookiecutters_dir'] @@ -258,5 +277,6 @@ if '{{ cookiecutter.use_lets_encrypt }}'.lower() == 'y' and '{{ cookiecutter.use if '{{ cookiecutter.open_source_license}}' != 'GPLv3': remove_copying_files() -# 4. Copy files from /docs/ to {{ cookiecutter.project_slug }}/docs/ -# copy_doc_files(PROJECT_DIRECTORY) +# 12. Remove Elastic Beanstalk files +if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': + remove_elasticbeanstalk() diff --git a/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config new file mode 100644 index 000000000..c0774efae --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/10_packages.config @@ -0,0 +1,5 @@ +packages: + yum: + git: [] + postgresql94-devel: [] + libjpeg-turbo-devel: [] diff --git a/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config b/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config new file mode 100644 index 000000000..539f55094 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/20_elasticcache.config @@ -0,0 +1,46 @@ +#This sample requires you to create a separate configuration file that defines the custom +# option settings for CacheCluster properties. + +Resources: + MyCacheSecurityGroup: + Type: "AWS::EC2::SecurityGroup" + Properties: + GroupDescription: "Lock cache down to webserver access only" + SecurityGroupIngress : + - IpProtocol : "tcp" + FromPort : + Fn::GetOptionSetting: + OptionName : "CachePort" + DefaultValue: "6379" + ToPort : + Fn::GetOptionSetting: + OptionName : "CachePort" + DefaultValue: "6379" + SourceSecurityGroupName: + Ref: "AWSEBSecurityGroup" + MyElastiCache: + Type: "AWS::ElastiCache::CacheCluster" + Properties: + CacheNodeType: + Fn::GetOptionSetting: + OptionName : "CacheNodeType" + DefaultValue : "cache.t1.micro" + NumCacheNodes: + Fn::GetOptionSetting: + OptionName : "NumCacheNodes" + DefaultValue : "1" + Engine: + Fn::GetOptionSetting: + OptionName : "Engine" + DefaultValue : "redis" + VpcSecurityGroupIds: + - + Fn::GetAtt: + - MyCacheSecurityGroup + - GroupId + +Outputs: + ElastiCache: + Description : "ID of ElastiCache Cache Cluster with Redis Engine" + Value : + Ref : "MyElastiCache" diff --git a/{{cookiecutter.project_slug}}/.ebextensions/30_options.config b/{{cookiecutter.project_slug}}/.ebextensions/30_options.config new file mode 100644 index 000000000..d7135c3f9 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/30_options.config @@ -0,0 +1,6 @@ +option_settings: + "aws:elasticbeanstalk:customoption": + CacheNodeType : cache.t1.micro + NumCacheNodes : 1 + Engine : redis + CachePort : 6379 diff --git a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config new file mode 100644 index 000000000..02636e1ad --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config @@ -0,0 +1,17 @@ +container_commands: + 01_migrate: + command: "source /opt/python/run/venv/bin/activate && python manage.py migrate" + leader_only: True + 02_collectstatic: + command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput" +option_settings: + "aws:elasticbeanstalk:application:environment": + DJANGO_SETTINGS_MODULE: "config.settings.production" + REDIS_ENDPOINT_ADDRESS: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Address"]}`' + REDIS_PORT: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Port"]}`' + "aws:elasticbeanstalk:container:python": + WSGIPath: "config/wsgi.py" + NumProcesses: 3 + NumThreads: 20 + "aws:elasticbeanstalk:container:python:staticfiles": + "/static/": "www/static/" diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index f760a1e2c..b248a2c3d 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -138,3 +138,13 @@ See detailed `cookiecutter-django Docker documentation`_. .. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html {% endif %} +{% if cookiecutter.use_elasticbeanstalk_experimental %} + +Elastic Beanstalk +~~~~~~~~~~~~~~~~~~ + +See detailed `cookiecutter-django Elastic Beanstalk documentation`_. + +.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html + +{% endif %} diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index c46132a33..7934182ae 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -178,16 +178,39 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [ # DATABASE CONFIGURATION # ------------------------------------------------------------------------------ +{% if cookiecutter.use_elasticbeanstalk_experimental -%} +# Uses Amazon RDS for database hosting, which doesn't follow the Heroku-style spec +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': env('RDS_DB_NAME'), + 'USER': env('RDS_USERNAME'), + 'PASSWORD': env('RDS_PASSWORD'), + 'HOST': env('RDS_HOSTNAME'), + 'PORT': env('RDS_PORT'), + } +} +{% else %} +# Use the Heroku-style specification # Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ DATABASES['default'] = env.db('DATABASE_URL') +{%- endif %} # CACHING # ------------------------------------------------------------------------------ +{% if cookiecutter.use_elasticbeanstalk_experimental -%} +REDIS_LOCATION = "redis://{}:{}/0".format( + env('REDIS_ENDPOINT_ADDRESS'), + env('REDIS_PORT') +) +{% else %} +REDIS_LOCATION = '{0}/{1}'.format(env('REDIS_URL', default='redis://127.0.0.1:6379'), 0) +{%- endif %} # Heroku URL does not pass the DB number, so we parse it in CACHES = { 'default': { 'BACKEND': 'django_redis.cache.RedisCache', - 'LOCATION': '{0}/{1}'.format(env('REDIS_URL', default='redis://127.0.0.1:6379'), 0), + 'LOCATION': REDIS_LOCATION, 'OPTIONS': { 'CLIENT_CLASS': 'django_redis.client.DefaultClient', 'IGNORE_EXCEPTIONS': True, # mimics memcache behavior. diff --git a/{{cookiecutter.project_slug}}/ebsetenv.py b/{{cookiecutter.project_slug}}/ebsetenv.py new file mode 100644 index 000000000..fbb8dc2d8 --- /dev/null +++ b/{{cookiecutter.project_slug}}/ebsetenv.py @@ -0,0 +1,31 @@ +"""Converts a .env file to Elastic Beanstalk environment variables""" + +from sys import exit +from subprocess import check_call + +try: + import dotenv +except ImportError: + print("Please install the 'dotenv' library: 'pip install dotenv'") + exit() + +def main(): + command = ['eb', 'setenv'] + failures = [] + for key, value in dotenv.Dotenv('.env').items(): + if key.startswith('POSTGRES'): + continue + if value: + command.append("{}={}".format(key, value)) + else: + failures.append(key) + if failures: + for failure in failures: + print("{} requires a value".format(failure)) + else: + print(' '.join(command)) + check_call(command) + + +if __name__ == '__main__': + main() diff --git a/{{cookiecutter.project_slug}}/env.example b/{{cookiecutter.project_slug}}/env.example index b634a49db..66a3570d7 100644 --- a/{{cookiecutter.project_slug}}/env.example +++ b/{{cookiecutter.project_slug}}/env.example @@ -1,3 +1,4 @@ + # PostgreSQL POSTGRES_PASSWORD=mysecretpass POSTGRES_USER=postgresuser From 0eaf6a7b0ca2d7fd0bb7c04b0c00c99db9f790c0 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 18:32:56 -0700 Subject: [PATCH 035/280] Fix FAQ --- docs/deployment-with-elastic-beanstalk.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index e88decfc0..fb57607fb 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -51,4 +51,4 @@ FAQ Why Not Use Docker on Elastic Beanstalk? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk). +Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). From 716717fe53162893ba8941030c03f3d7d7f3bb58 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 21:45:16 -0700 Subject: [PATCH 036/280] Fix markup --- docs/deployment-with-elastic-beanstalk.rst | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index fb57607fb..ae3f41a59 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -18,32 +18,32 @@ Prerequisites Instructions ------------- -``` -# creates the directory of environments (servers) -eb init -p python3.4 {{ cookiecutter.project_slug }} +:: -# Creates the environment (server) where the app will run -eb create {{ cookiecutter.project_slug }} -# Note: This will fail on a postgres error, because postgres doesn't exist yet + # creates the directory of environments (servers) + eb init -p python3.4 {{ cookiecutter.project_slug }} -# Make sure you are in the right environment -eb list + # Creates the environment (server) where the app will run + eb create {{ cookiecutter.project_slug }} + # Note: This will fail on a postgres error, because postgres doesn't exist yet -# If you are not in the right environment -eb use {{ cookiecutter.project_slug }} + # Make sure you are in the right environment + eb list -# Set the environment variables -python ebsetenv.py + # If you are not in the right environment + eb use {{ cookiecutter.project_slug }} -# Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) -# Get some coffee, this is going to take a while + # Set the environment variables + python ebsetenv.py -# Deploy again -eb deploy + # Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) + # Get some coffee, this is going to take a while -# Take a look -eb open -``` + # Deploy again + eb deploy + + # Take a look + eb open FAQ ----- @@ -51,4 +51,4 @@ FAQ Why Not Use Docker on Elastic Beanstalk? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). +Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). From 4b95bd9c5e53373e32019b71909629fb0e141d18 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 23 Sep 2016 17:14:17 -0700 Subject: [PATCH 037/280] A little cleanup of the EB docs --- docs/deployment-with-elastic-beanstalk.rst | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index ae3f41a59..5074770f0 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -18,18 +18,28 @@ Prerequisites Instructions ------------- +If you haven't done so, create a directory of environments. + :: - # creates the directory of environments (servers) eb init -p python3.4 {{ cookiecutter.project_slug }} - # Creates the environment (server) where the app will run - eb create {{ cookiecutter.project_slug }} - # Note: This will fail on a postgres error, because postgres doesn't exist yet - # Make sure you are in the right environment +Once that is done, create the environment (server) where the app will run + +:: + + eb create {{ cookiecutter.project_slug }} + # Note: This will eventually fail on a postgres error, because postgres doesn't exist yet + +Now make sure you are in the right environment + +:: + eb list +TODO: Finsh it:: + # If you are not in the right environment eb use {{ cookiecutter.project_slug }} From c4ad073f0d15eef870109eb36a1d9199968513d1 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 26 Sep 2016 09:19:15 -0700 Subject: [PATCH 038/280] Made Elastic Beanstalk support incompatible with Docker and Heroku --- cookiecutter.json | 4 ++-- hooks/pre_gen_project.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index ababd56b7..bf729b678 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -17,10 +17,10 @@ "use_python3": "y", "use_docker": "y", "use_heroku": "n", + "use_elasticbeanstalk_experimental": "n", "use_compressor": "n", "postgresql_version": ["9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], "use_lets_encrypt": "n", - "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"], - "use_elasticbeanstalk_experimental": "n" + "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] } diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 9cd168bce..cd31774e0 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -3,4 +3,9 @@ project_slug = '{{ cookiecutter.project_slug }}' if hasattr(project_slug, 'isidentifier'): assert project_slug.isidentifier(), 'Project slug should be valid Python identifier!' +elasticbeanstalk = '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() +heroku = '{{ cookiecutter.use_heroku }}'.lower() +docker = '{{ cookiecutter.use_docker }}'.lower() +if elasticbeanstalk == 'y' and (heroku == 'y' or docker == 'y'): + raise Exception("Cookiecutter Django's EXPERIMENTAL Elastic Beanstalk support is incompatible with Heroku and Docker setups.") From d31e86fc8ace6e273cc19271139f9ac52d3db085 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 26 Sep 2016 09:28:35 -0700 Subject: [PATCH 039/280] Now includes message for missing .env file. Fixed #819 --- {{cookiecutter.project_slug}}/ebsetenv.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/{{cookiecutter.project_slug}}/ebsetenv.py b/{{cookiecutter.project_slug}}/ebsetenv.py index fbb8dc2d8..ba9652db7 100644 --- a/{{cookiecutter.project_slug}}/ebsetenv.py +++ b/{{cookiecutter.project_slug}}/ebsetenv.py @@ -1,5 +1,6 @@ """Converts a .env file to Elastic Beanstalk environment variables""" +import os from sys import exit from subprocess import check_call @@ -10,10 +11,15 @@ except ImportError: exit() def main(): + if not os.path.exists('.env'): + print('ERROR!! .env file is missing!') + print("Please copy 'env.example' to '.env' and add appropriate values") + exit() command = ['eb', 'setenv'] failures = [] for key, value in dotenv.Dotenv('.env').items(): if key.startswith('POSTGRES'): + print('Skipping POSTGRES values - Amazon RDS provides these') continue if value: command.append("{}={}".format(key, value)) From f803f8f2ab29ae621f00a817ece03ed0cdd144f3 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Mon, 26 Sep 2016 10:23:45 -0700 Subject: [PATCH 040/280] FAQ entry on combining multiple deployment options --- docs/deployment-with-elastic-beanstalk.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index 5074770f0..54c32fecd 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -62,3 +62,8 @@ Why Not Use Docker on Elastic Beanstalk? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk) on top of an abstraction (Cookiecutter Django). + +Why Can't I Use Both Docker/Heroku with Elastic Beanstalk? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Because the environment variables that our Docker and Heroku setups use for PostgreSQL access is different then how Amazon RDS handles this access. At this time we're just trying to get things to work reliably with Elastic Beanstalk, and full integration will come later. From a091dcbae890240658a99bf8405b2fa7fe974ad9 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 28 Sep 2016 16:42:02 -0700 Subject: [PATCH 041/280] Fix elastic beanstalk checks --- {{cookiecutter.project_slug}}/README.rst | 6 +++--- {{cookiecutter.project_slug}}/config/settings/production.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index b248a2c3d..e06a85ba3 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -117,7 +117,7 @@ Deployment ---------- The following details how to deploy this application. -{% if cookiecutter.use_heroku == "y" %} +{% if cookiecutter.use_heroku.lower() == "y" %} Heroku ^^^^^^ @@ -129,7 +129,7 @@ See detailed `cookiecutter-django Heroku documentation`_. .. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html {% endif %} -{% if cookiecutter.use_docker == "y" %} +{% if cookiecutter.use_docker.lower() == "y" %} Docker ^^^^^^ @@ -138,7 +138,7 @@ See detailed `cookiecutter-django Docker documentation`_. .. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html {% endif %} -{% if cookiecutter.use_elasticbeanstalk_experimental %} +{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' %} Elastic Beanstalk ~~~~~~~~~~~~~~~~~~ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 7934182ae..2201c3fc4 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -178,7 +178,7 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [ # DATABASE CONFIGURATION # ------------------------------------------------------------------------------ -{% if cookiecutter.use_elasticbeanstalk_experimental -%} +{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} # Uses Amazon RDS for database hosting, which doesn't follow the Heroku-style spec DATABASES = { 'default': { @@ -198,7 +198,7 @@ DATABASES['default'] = env.db('DATABASE_URL') # CACHING # ------------------------------------------------------------------------------ -{% if cookiecutter.use_elasticbeanstalk_experimental -%} +{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%} REDIS_LOCATION = "redis://{}:{}/0".format( env('REDIS_ENDPOINT_ADDRESS'), env('REDIS_PORT') From ab52466f445da849bdc99ef3e446fc1f5d040528 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 00:14:11 -0300 Subject: [PATCH 042/280] Bump for 1.9.9-05 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 35685f3bc..30df6fdd1 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = '1.9.9-04' +version = '1.9.9-05' if sys.argv[-1] == 'tag': os.system('git tag -a %s -m "version %s"' % (version, version)) From f2aab6edc3ddbe3dd003041f39c0a28cce6f01b4 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:28:33 -0300 Subject: [PATCH 043/280] rename MIDDLEWARE_CLASSES to MIDDLEWARE --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- {{cookiecutter.project_slug}}/config/settings/local.py | 2 +- .../config/settings/production.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index c9433416c..ef2d53b3a 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -53,7 +53,7 @@ INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS # MIDDLEWARE CONFIGURATION # ------------------------------------------------------------------------------ -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index e6fd99f83..c72d3af11 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -50,7 +50,7 @@ CACHES = { # django-debug-toolbar # ------------------------------------------------------------------------------ -MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) +MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',) INSTALLED_APPS += ('debug_toolbar', ) INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ] diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 2201c3fc4..7fa726f6d 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -42,11 +42,11 @@ INSTALLED_APPS += ('raven.contrib.django.raven_compat', ) # Use Whitenoise to serve static files # See: https://whitenoise.readthedocs.io/ WHITENOISE_MIDDLEWARE = ('whitenoise.middleware.WhiteNoiseMiddleware', ) -MIDDLEWARE_CLASSES = WHITENOISE_MIDDLEWARE + MIDDLEWARE_CLASSES +MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE {% endif %} {%- if cookiecutter.use_sentry_for_error_reporting == 'y' -%} RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware', ) -MIDDLEWARE_CLASSES = RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES +MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE {% endif %} {%- if cookiecutter.use_opbeat == 'y' -%} # opbeat integration @@ -57,9 +57,9 @@ OPBEAT = { 'APP_ID': env('DJANGO_OPBEAT_APP_ID'), 'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN') } -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware', -) + MIDDLEWARE_CLASSES +) + MIDDLEWARE {% endif %} # SECURITY CONFIGURATION From f040921d9a5c1e7c506c9059d67d5a199581ef05 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:37:57 -0300 Subject: [PATCH 044/280] add default AUTH_PASSWORD_VALIDATORS --- .../config/settings/common.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index ef2d53b3a..04998575f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -200,6 +200,26 @@ ROOT_URLCONF = 'config.urls' # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application WSGI_APPLICATION = 'config.wsgi.application' + +# PASSWORD VALIDATION +# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators +# ------------------------------------------------------------------------------ + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + # AUTHENTICATION CONFIGURATION # ------------------------------------------------------------------------------ AUTHENTICATION_BACKENDS = ( From 178844d616b5826200ca34357f3daa1a13d74ecc Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:41:48 -0300 Subject: [PATCH 045/280] use manage.py from django 1.10 --- {{cookiecutter.project_slug}}/manage.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/manage.py b/{{cookiecutter.project_slug}}/manage.py index b41522c7d..86d03b318 100755 --- a/{{cookiecutter.project_slug}}/manage.py +++ b/{{cookiecutter.project_slug}}/manage.py @@ -5,6 +5,19 @@ import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') - from django.core.management import execute_from_command_line - + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise execute_from_command_line(sys.argv) From 4f9bb652f243084ae86802b1c915539b01225102 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:56:48 -0300 Subject: [PATCH 046/280] ignore F401 error on manage.py --- {{cookiecutter.project_slug}}/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/manage.py b/{{cookiecutter.project_slug}}/manage.py index 86d03b318..9de71376f 100755 --- a/{{cookiecutter.project_slug}}/manage.py +++ b/{{cookiecutter.project_slug}}/manage.py @@ -12,7 +12,7 @@ if __name__ == '__main__': # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: - import django + import django # noqa except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and " From 6c0cb7ed72d580d8b4a87390b2aa018f32548a2b Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 15 Sep 2016 00:59:26 -0300 Subject: [PATCH 047/280] update django to 1.10.1 --- setup.py | 4 ++-- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 30df6fdd1..a20a28b2b 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: # Our version ALWAYS matches the version of Django we support # If Django has a new release, we branch, tag, then update this setting after the tag. -version = '1.9.9-05' +version = '1.10.1' if sys.argv[-1] == 'tag': os.system('git tag -a %s -m "version %s"' % (version, version)) @@ -34,7 +34,7 @@ setup( classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', - 'Framework :: Django :: 1.9', + 'Framework :: Django :: 1.10', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index fcc10ba24..13378d8fa 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.9.9 +django==1.10.1 # Configuration django-environ==0.4.0 From 6cbc513e6d50c250819f679f887d7a00a2e79818 Mon Sep 17 00:00:00 2001 From: Steve Steiner Date: Thu, 15 Sep 2016 12:40:15 -0400 Subject: [PATCH 048/280] Make test_docker.sh tests pass by passing new password auth rules --- tests/test_cookiecutter_generation.py | 0 tests/test_docker.sh | 0 .../users/tests/test_admin.py | 10 +++++----- 3 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 tests/test_cookiecutter_generation.py mode change 100644 => 100755 tests/test_docker.sh diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py old mode 100644 new mode 100755 diff --git a/tests/test_docker.sh b/tests/test_docker.sh old mode 100644 new mode 100755 diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py index 10b07b749..a1ff0b846 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py @@ -6,14 +6,14 @@ from ..admin import MyUserCreationForm class TestMyUserCreationForm(TestCase): def setUp(self): - self.user = self.make_user() + self.user = self.make_user('notalamode', 'notalamodespassword') def test_clean_username_success(self): # Instantiate the form with a new username form = MyUserCreationForm({ 'username': 'alamode', - 'password1': '123456', - 'password2': '123456', + 'password1': '7jefB#f@Cc7YJB]2v', + 'password2': '7jefB#f@Cc7YJB]2v', }) # Run is_valid() to trigger the validation valid = form.is_valid() @@ -27,8 +27,8 @@ class TestMyUserCreationForm(TestCase): # Instantiate the form with the same username as self.user form = MyUserCreationForm({ 'username': self.user.username, - 'password1': '123456', - 'password2': '123456', + 'password1': 'notalamodespassword', + 'password2': 'notalamodespassword', }) # Run is_valid() to trigger the validation, which is going to fail # because the username is already taken From 2aed9268b6159a0dd1088ca8eac93961955b3bea Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 20 Sep 2016 19:03:35 -0300 Subject: [PATCH 049/280] update frontend dependencies --- .../templates/base.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 3518fe6e7..94f9ef9f5 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -14,8 +14,8 @@ {% block css %} - - + + {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %} @@ -89,10 +89,10 @@ ================================================== --> {% block javascript %} - - - - + + + + From b4e6e081000faad01f1a7e0eb0e1d6020aff2f6d Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Tue, 20 Sep 2016 19:05:36 -0300 Subject: [PATCH 050/280] change 'admin' url, to stay the same as generated by django 1.10 https://github.com/django/django/blob/1.10.1/django/conf/project_template/project_name/urls.py-tpl#L20 --- {{cookiecutter.project_slug}}/config/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/urls.py b/{{cookiecutter.project_slug}}/config/urls.py index f3a621127..cbb977ff0 100644 --- a/{{cookiecutter.project_slug}}/config/urls.py +++ b/{{cookiecutter.project_slug}}/config/urls.py @@ -13,7 +13,7 @@ urlpatterns = [ url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name='about'), # Django Admin, use {% raw %}{% url 'admin:index' %}{% endraw %} - url(settings.ADMIN_URL, include(admin.site.urls)), + url(settings.ADMIN_URL, admin.site.urls), # User management url(r'^users/', include('{{ cookiecutter.project_slug }}.users.urls', namespace='users')), From 0e9eafbfc43be2ff37e8488d226bdfa4a3e8565d Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 23 Sep 2016 01:28:27 -0300 Subject: [PATCH 051/280] sync migrations with django1.10 --- .../contrib/sites/migrations/0001_initial.py | 23 ++++++----- .../migrations/0002_alter_domain_unique.py | 23 +++++++++++ ...me.py => 0003_set_site_domain_and_name.py} | 2 +- .../users/migrations/0001_initial.py | 39 ++++++++++--------- 4 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py rename {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/{0002_set_site_domain_and_name.py => 0003_set_site_domain_and_name.py} (96%) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py index 555d02c42..b1803682a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py @@ -1,31 +1,34 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations import django.contrib.sites.models +from django.contrib.sites.models import _simple_domain_name_validator +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ] + dependencies = [] operations = [ migrations.CreateModel( name='Site', fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), - ('domain', models.CharField(verbose_name='domain name', max_length=100, validators=[django.contrib.sites.models._simple_domain_name_validator])), - ('name', models.CharField(verbose_name='display name', max_length=50)), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('domain', models.CharField( + max_length=100, verbose_name='domain name', validators=[_simple_domain_name_validator] + )), + ('name', models.CharField(max_length=50, verbose_name='display name')), ], options={ - 'verbose_name_plural': 'sites', - 'verbose_name': 'site', - 'db_table': 'django_site', 'ordering': ('domain',), + 'db_table': 'django_site', + 'verbose_name': 'site', + 'verbose_name_plural': 'sites', }, + bases=(models.Model,), managers=[ - (b'objects', django.contrib.sites.models.SiteManager()), + ('objects', django.contrib.sites.models.SiteManager()), ], ), ] diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py new file mode 100644 index 000000000..468718cde --- /dev/null +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +import django.contrib.sites.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sites', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='site', + name='domain', + field=models.CharField( + max_length=100, unique=True, validators=[django.contrib.sites.models._simple_domain_name_validator], + verbose_name='domain name' + ), + ), + ] diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_set_site_domain_and_name.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py similarity index 96% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_set_site_domain_and_name.py rename to {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py index e6292f0b0..348989e13 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_set_site_domain_and_name.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -38,7 +38,7 @@ def update_site_backward(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('sites', '0001_initial'), + ('sites', '0002_alter_domain_unique'), ] operations = [ diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py index 8327d2890..626e10f3d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py @@ -1,44 +1,47 @@ # -*- coding: utf-8 -*- +# Generated by Django 1.9.9 on 2016-09-23 04:10 from __future__ import unicode_literals -from django.db import models, migrations -import django.utils.timezone import django.contrib.auth.models import django.core.validators +from django.db import migrations, models +import django.utils.timezone class Migration(migrations.Migration): + initial = True + dependencies = [ - ('auth', '0006_require_contenttypes_0002'), + ('auth', '0007_alter_validators_add_error_messages'), ] operations = [ migrations.CreateModel( name='User', fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), - ('last_login', models.DateTimeField(null=True, verbose_name='last login', blank=True)), - ('is_superuser', models.BooleanField(help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status', default=False)), - ('username', models.CharField(max_length=30, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], verbose_name='username', error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True)), - ('first_name', models.CharField(max_length=30, verbose_name='first name', blank=True)), - ('last_name', models.CharField(max_length=30, verbose_name='last name', blank=True)), - ('email', models.EmailField(max_length=254, verbose_name='email address', blank=True)), - ('is_staff', models.BooleanField(help_text='Designates whether the user can log into this admin site.', verbose_name='staff status', default=False)), - ('is_active', models.BooleanField(help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active', default=True)), - ('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)), - ('groups', models.ManyToManyField(related_name='user_set', blank=True, verbose_name='groups', to='auth.Group', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_query_name='user')), - ('user_permissions', models.ManyToManyField(related_name='user_set', blank=True, verbose_name='user permissions', to='auth.Permission', help_text='Specific permissions for this user.', related_query_name='user')), - ('name', models.CharField(max_length=255, verbose_name='Name of User', blank=True)), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), + ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('name', models.CharField(blank=True, max_length=255, verbose_name='Name of User')), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ - 'verbose_name': 'user', 'abstract': False, + 'verbose_name': 'user', 'verbose_name_plural': 'users', }, managers=[ - (b'objects', django.contrib.auth.models.UserManager()), + ('objects', django.contrib.auth.models.UserManager()), ], ), ] From e953fda8dfe043ce9984513fd86b9021d7666f5f Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 23 Sep 2016 01:29:10 -0300 Subject: [PATCH 052/280] fix documentation about contrib/sites migrations --- docs/faq.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 854e9dddd..def4ba1f9 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -8,9 +8,9 @@ Why is there a django.contrib.sites directory in Cookiecutter Django? It is there to add a migration so you don't have to manually change the ``sites.Site`` record from ``example.com`` to whatever your domain is. Instead, your ``{{cookiecutter.domain_name}}`` and {{cookiecutter.project_name}} value is placed by **Cookiecutter** in the domain and name fields respectively. -See `0002_set_site_domain_and_name.py`_. +See `0003_set_site_domain_and_name.py`_. -.. _`0002_set_site_domain_and_name.py`: https://github.com/pydanny/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/contrib/sites/migrations/0002_set_site_domain_and_name.py +.. _`0003_set_site_domain_and_name.py`: https://github.com/pydanny/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/%7B%7Bcookiecutter.project_slug%7D%7D/contrib/sites/migrations/0003_set_site_domain_and_name.py Why aren't you using just one configuration file (12-Factor App) From 97febbf8b4a9efd47ad923b63c38b6e66db016f2 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Fri, 23 Sep 2016 01:32:41 -0300 Subject: [PATCH 053/280] removed django-autoslug until it's ready for 1.10 --- requirements_to_watch.txt | 2 ++ {{cookiecutter.project_slug}}/requirements/base.txt | 1 - .../users/migrations/0001_initial.py | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/requirements_to_watch.txt b/requirements_to_watch.txt index 3e25cb204..34f0fe621 100644 --- a/requirements_to_watch.txt +++ b/requirements_to_watch.txt @@ -1,2 +1,4 @@ # These requirements prevented an upgrade to Django 1.10. django-coverage-plugin==1.3.1 +django-autoslug==1.9.3 + diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 13378d8fa..df90ba070 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -40,7 +40,6 @@ psycopg2==2.6.2 # Unicode slugification awesome-slugify==1.6.5 -django-autoslug==1.9.3 # Time zones support pytz==2016.6.1 diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py index 626e10f3d..e76c333f0 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.9 on 2016-09-23 04:10 +# Generated by Django 1.10.1 on 2016-09-23 04:36 from __future__ import unicode_literals import django.contrib.auth.models -import django.core.validators +import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone @@ -13,7 +13,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('auth', '0007_alter_validators_add_error_messages'), + ('auth', '0008_alter_user_username_max_length'), ] operations = [ @@ -24,7 +24,7 @@ class Migration(migrations.Migration): ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), - ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), @@ -36,9 +36,9 @@ class Migration(migrations.Migration): ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ - 'abstract': False, - 'verbose_name': 'user', 'verbose_name_plural': 'users', + 'verbose_name': 'user', + 'abstract': False, }, managers=[ ('objects', django.contrib.auth.models.UserManager()), From e9fc2f0582dfe2579e5e15920c917999bbd801fc Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Wed, 28 Sep 2016 23:58:39 -0300 Subject: [PATCH 054/280] update django-redis and whitenoise version --- {{cookiecutter.project_slug}}/requirements/base.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index df90ba070..b2abd4ed9 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ django==1.10.1 # Configuration django-environ==0.4.0 {% if cookiecutter.use_whitenoise == 'y' -%} -whitenoise==3.2.1 +whitenoise==3.2.2 {%- endif %} @@ -45,8 +45,8 @@ awesome-slugify==1.6.5 pytz==2016.6.1 # Redis support -django-redis==4.4.4 -redis>=2.10.0 +django-redis==4.5.0 +redis>=2.10.5 {% if cookiecutter.use_celery == "y" %} celery==3.1.23 From 8f045fc08c36e518357c531b88b0154d922c8bf7 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 01:07:40 -0300 Subject: [PATCH 055/280] update jquery to 3.1.1 --- .../{{cookiecutter.project_slug}}/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 94f9ef9f5..e816a208d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -90,7 +90,7 @@ {% block javascript %} - + From 8fca0e0154b44dabf8d41739e448597d44d22317 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 01:08:24 -0300 Subject: [PATCH 056/280] update README and CHANGELOG --- CHANGELOG.md | 17 +++++++++++++++-- README.rst | 6 +++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30851f243..22bf18f0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,22 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -##[2016-09-22] +##[2016-09-28] ### Added -- New setting MAILGUN_SENDER_DOMAIN to allow sending mail from any domain other than those registered with mailgun (@jangeador) +- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) +- Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) +- New setting `MAILGUN_SENDER_DOMAIN` to allow sending mail from any domain other than those registered with mailgun (@jangeador) +### Changed +- Upgrade to Django 1.10.1 (@luzfcb) +- Upgrade django-model-utils to 2.6, django-redis to 4.5.0, redis to 2.10.5, Sphinx to 1.4.6, pytest-django to 3.0.0, django-anymail to 0.5, raven to 5.27.1 (@luzfcb) +- Upgrade to Bootstrap 4 Alpha 4, jQuery to 3.1.1, tether.js to 1.3.7 (@luzfcb) +- Update `manage.py` to use same code of `manage.py` from Django 1.10 (@luzfcb) +- Sync `sites` app migrations with django 1.10, and fix aditional migrations to `sites` and `user` app (@luzfcb) +d changed 'admin' url on `config/urls.py`, to stay the same as generated by django 1.10 (@luzfcb) +- Make test_docker.sh tests pass by passing new password auth rules (@ssteinerx) +### Removed +- Removed django-autoslug because not support django 1.10 at this date (@luzfcb) + ##[2016-09-10] ### Changed diff --git a/README.rst b/README.rst index b129a2156..e9980f7b9 100644 --- a/README.rst +++ b/README.rst @@ -26,9 +26,9 @@ Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting pr Features --------- -* For Django 1.9 +* For Django 1.10 * Renders Django projects with 100% starting test coverage -* Twitter Bootstrap_ v4.0.0 - `alpha 3`_ +* Twitter Bootstrap_ v4.0.0 - `alpha 4`_ * 12-Factor_ based settings via django-environ_ * Optimized development and production settings * Registration via django-allauth_ @@ -56,7 +56,7 @@ Optional Integrations * Integration with Sentry_ for error logging * Integration with Opbeat_ for performance monitoring -.. _`alpha 3`: http://blog.getbootstrap.com/2016/07/27/bootstrap-4-alpha-3/ +.. _`alpha 4`: http://blog.getbootstrap.com/2016/09/05/bootstrap-4-alpha-4/ .. _Bootstrap: https://github.com/twbs/bootstrap .. _django-environ: https://github.com/joke2k/django-environ .. _12-Factor: http://12factor.net/ From 42f94cdd865723db97d202ae1ad5f5fa41774612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 01:24:51 -0300 Subject: [PATCH 057/280] fix CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22bf18f0c..46e0b38bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) - New setting `MAILGUN_SENDER_DOMAIN` to allow sending mail from any domain other than those registered with mailgun (@jangeador) + ### Changed - Upgrade to Django 1.10.1 (@luzfcb) - Upgrade django-model-utils to 2.6, django-redis to 4.5.0, redis to 2.10.5, Sphinx to 1.4.6, pytest-django to 3.0.0, django-anymail to 0.5, raven to 5.27.1 (@luzfcb) @@ -15,6 +16,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Sync `sites` app migrations with django 1.10, and fix aditional migrations to `sites` and `user` app (@luzfcb) d changed 'admin' url on `config/urls.py`, to stay the same as generated by django 1.10 (@luzfcb) - Make test_docker.sh tests pass by passing new password auth rules (@ssteinerx) + ### Removed - Removed django-autoslug because not support django 1.10 at this date (@luzfcb) From 665c890db52b57327c1b3abea6a6ecdbe038c033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 01:25:15 -0300 Subject: [PATCH 058/280] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e0b38bf..290d805b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -##[2016-09-28] +##[2016-09-29] ### Added - Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) From dceb2438cfbe7f40424393cba7669f46570593a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 01:27:48 -0300 Subject: [PATCH 059/280] fix CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 290d805b7..6bb0e1f36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ##[2016-09-29] ### Added -- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See (Password Validation docs)[https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation] (@luzfcb) +- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See [Password Validation docs](https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation") (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) - New setting `MAILGUN_SENDER_DOMAIN` to allow sending mail from any domain other than those registered with mailgun (@jangeador) From ef020ecd3121d69a518cc517d6c82fdcbbee3333 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:04 -0700 Subject: [PATCH 060/280] Update django-model-utils from 2.5.2 to 2.6 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index b2abd4ed9..0c983013a 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -21,7 +21,7 @@ django-braces==1.9.0 django-crispy-forms==1.6.0 # Models -django-model-utils==2.5.2 +django-model-utils==2.6 # Images Pillow==3.3.1 From 3872cd08c3790f08c6859847135e7079e6f42c5d Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:13 -0700 Subject: [PATCH 061/280] Update raven from 5.27.0 to 5.27.1 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 88300ff7d..827f3eeb8 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==0.5 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==5.27.0 +raven==5.27.1 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From 80c569e2c25cd47bbf906c9c94939484c20377f4 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:53 -0700 Subject: [PATCH 062/280] Update pytest-django from 2.9.1 to 3.0.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index bc260ba51..7661a46a1 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -12,5 +12,5 @@ django-debug-toolbar==1.5 # improved REPL ipdb==0.10.1 -pytest-django==2.9.1 +pytest-django==3.0.0 pytest-sugar==0.7.1 From b28fe19f3ab332f66a7d7abe2009fdfd009b8e35 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Sep 2016 21:32:54 -0700 Subject: [PATCH 063/280] Update pytest-django from 2.9.1 to 3.0.0 --- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index b607cbc54..42ed08c56 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -13,5 +13,5 @@ django-test-plus==1.0.15 factory_boy==2.7.0 # pytest -pytest-django==2.9.1 +pytest-django==3.0.0 pytest-sugar==0.7.1 From 37138c938d350c7c18cb846937d4813154e89d76 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 01:58:13 -0300 Subject: [PATCH 064/280] fix tox deprecation warning #781 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c5b301991..140796cff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ -[pytest] +[tool:pytest] python_paths = . norecursedirs = .tox .git */migrations/* */static/* docs venv */{{cookiecutter.project_slug}}/* From 2f8a7d0641b67ba8d78a394e8405338fff6e80c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Thu, 29 Sep 2016 02:11:45 -0300 Subject: [PATCH 065/280] upgrade Sphinx to 1.4.6 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 7661a46a1..a5891b7e6 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.2 django-coverage-plugin==1.3.1 -Sphinx==1.4.5 +Sphinx==1.4.6 django-extensions==1.7.4 Werkzeug==0.11.11 django-test-plus==1.0.15 From bbcd40819333419d67291f81291bf186896631ee Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 13:09:49 -0300 Subject: [PATCH 066/280] add django-debug-toolbar urlpatterns --- {{cookiecutter.project_slug}}/config/urls.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/urls.py b/{{cookiecutter.project_slug}}/config/urls.py index cbb977ff0..6bb25f745 100644 --- a/{{cookiecutter.project_slug}}/config/urls.py +++ b/{{cookiecutter.project_slug}}/config/urls.py @@ -33,3 +33,9 @@ if settings.DEBUG: url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception('Page not Found')}), url(r'^500/$', default_views.server_error), ] + if 'debug_toolbar' in settings.INSTALLED_APPS: + import debug_toolbar + + urlpatterns += [ + url(r'^__debug__/', include(debug_toolbar.urls)), + ] From c1b389b27d617060c56139666f5aa03c0458bf6c Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 13:12:11 -0300 Subject: [PATCH 067/280] workaround to fix django-debug-toolbar issue #827 --- {{cookiecutter.project_slug}}/requirements/local.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index a5891b7e6..04be3f9b8 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -7,7 +7,11 @@ django-extensions==1.7.4 Werkzeug==0.11.11 django-test-plus==1.0.15 factory_boy==2.7.0 -django-debug-toolbar==1.5 + +# Temporary workaround to fix issue https://github.com/pydanny/cookiecutter-django/issues/827 +# It will be removed when django-debug-toolbar publish the new version on pypi +-e git+https://github.com/jazzband/django-debug-toolbar.git@637b0b73bc684f6ea600dca5ca1bb1f090fcee93#egg=django-debug-toolbar +#django-debug-toolbar==1.5 # improved REPL ipdb==0.10.1 From ed2834da541739680c2f4871115f90ff8f775ee4 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrioneuvo da Luz" Date: Thu, 29 Sep 2016 13:12:29 -0300 Subject: [PATCH 068/280] update changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bb0e1f36..1e434884a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,15 @@ This project adheres to [Semantic Versioning](http://semver.org/). ##[2016-09-29] ### Added -- Added add default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See [Password Validation docs](https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation") (@luzfcb) +- Added default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See [Password Validation docs](https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation") (@luzfcb) - Rename `MIDDLEWARE_CLASSES` to `MIDDLEWARE` to enable support to [new style middleware](https://github.com/django/deps/blob/master/final/0005-improved-middleware.rst) introduced in Django 1.10 (@luzfcb) - New setting `MAILGUN_SENDER_DOMAIN` to allow sending mail from any domain other than those registered with mailgun (@jangeador) +- add `urlpatterns` configuration to django-debug-toolbar, because the automatic configuration of `urlpatterns` was removed from django-debug-toolbar (@luzfcb) +- Added Temporary workaround on `requirements/local.txt` to fix django-debug-toolbar issue: https://github.com/pydanny/cookiecutter-django/issues/827 (@luzfcb) ### Changed - Upgrade to Django 1.10.1 (@luzfcb) -- Upgrade django-model-utils to 2.6, django-redis to 4.5.0, redis to 2.10.5, Sphinx to 1.4.6, pytest-django to 3.0.0, django-anymail to 0.5, raven to 5.27.1 (@luzfcb) +- Upgrade django-model-utils to 2.6, django-redis to 4.5.0, redis to 2.10.5, Sphinx to 1.4.6, pytest-django to 3.0.0, django-anymail to 0.5, raven to 5.27.1, whitenoise to 3.2.2 (@luzfcb) - Upgrade to Bootstrap 4 Alpha 4, jQuery to 3.1.1, tether.js to 1.3.7 (@luzfcb) - Update `manage.py` to use same code of `manage.py` from Django 1.10 (@luzfcb) - Sync `sites` app migrations with django 1.10, and fix aditional migrations to `sites` and `user` app (@luzfcb) From 772d7783a4d44f769ff601843ffb3c90f0a8350b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 29 Sep 2016 15:41:18 -0700 Subject: [PATCH 069/280] Update pytest from 3.0.2 to 3.0.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c0665d454..43100434d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.11 binaryornot==0.4.0 # Testing -pytest==3.0.2 +pytest==3.0.3 pep8==1.7.0 pyflakes==1.3.0 tox==2.3.1 From 19b709371f9baef368149e8aba9656a13347720e Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Fri, 30 Sep 2016 10:33:46 -0700 Subject: [PATCH 070/280] Elastic Beanstalk documentation cleanup --- docs/deployment-with-elastic-beanstalk.rst | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index 54c32fecd..e445cb5d3 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -18,30 +18,26 @@ Prerequisites Instructions ------------- -If you haven't done so, create a directory of environments. +If you haven't done so, create a directory of environments:: -:: + eb init -p python3.4 MY_PROJECT_SLUG - eb init -p python3.4 {{ cookiecutter.project_slug }} +Replace `MY_PROJECT_SLUG` with the value you entered for `project_slug`. +Once that is done, create the environment (server) where the app will run:: -Once that is done, create the environment (server) where the app will run - -:: - - eb create {{ cookiecutter.project_slug }} + eb create MY_PROJECT_SLUG # Note: This will eventually fail on a postgres error, because postgres doesn't exist yet -Now make sure you are in the right environment - -:: +Now make sure you are in the right environment:: eb list -TODO: Finsh it:: +If you are not in the right environment, then put yourself in the correct one:: - # If you are not in the right environment - eb use {{ cookiecutter.project_slug }} + eb use MY_PROJECT_SLUG + +TODO: Finish it:: # Set the environment variables python ebsetenv.py From 06c175eb633f05c96e8ce871de26e5df37b80545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Fri, 30 Sep 2016 15:46:32 -0300 Subject: [PATCH 071/280] add @townie to CONTRIBUTORS --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 652b7bd55..8803124f9 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -95,6 +95,7 @@ Listed in alphabetical order. Kaveh `@ka7eh`_ Kevin A. Stone Kevin Ndung'u `@kevgathuku`_ + Keith Webber `@townie`_ Krzysztof Szumny `@noisy`_ Krzysztof Żuraw `@krzysztofzuraw`_ Leonardo Jimenez `@xpostudio4`_ @@ -214,6 +215,7 @@ Listed in alphabetical order. .. _@sladinji: https://github.com/sladinji .. _@andresgz: https://github.com/andresgz .. _@jangeador: https://github.com/jangeador +.. _@townie: https://github.com/townie Special Thanks ~~~~~~~~~~~~~~ From 6446312eed09780eb6e9488cfa96658754741aca Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 1 Oct 2016 17:09:52 +0200 Subject: [PATCH 072/280] Update sphinx from 1.4.6 to 1.4.7 (#832) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 04be3f9b8..e3dca4666 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.2 django-coverage-plugin==1.3.1 -Sphinx==1.4.6 +Sphinx==1.4.7 django-extensions==1.7.4 Werkzeug==0.11.11 django-test-plus==1.0.15 From 024a9671c7f203b318772e0c4909057e602ea939 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 1 Oct 2016 09:20:26 -0700 Subject: [PATCH 073/280] Update sphinx from 1.4.7 to 1.4.8 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e3dca4666..236f00de5 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.2 django-coverage-plugin==1.3.1 -Sphinx==1.4.7 +Sphinx==1.4.8 django-extensions==1.7.4 Werkzeug==0.11.11 django-test-plus==1.0.15 From ccedf358956948091b3ff6140673c1e4274de694 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 5 Oct 2016 15:58:16 +0200 Subject: [PATCH 074/280] Update django from 1.10.1 to 1.10.2 (#834) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 0c983013a..217ce8bb4 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.10.1 +django==1.10.2 # Configuration django-environ==0.4.0 From ef2b68115d1a5c97fd7df052dbb8b72d1a6b0ed8 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 5 Oct 2016 15:58:25 +0200 Subject: [PATCH 075/280] Update celery from 3.1.23 to 3.1.24 (#831) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 217ce8bb4..f3be5909b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -49,7 +49,7 @@ django-redis==4.5.0 redis>=2.10.5 {% if cookiecutter.use_celery == "y" %} -celery==3.1.23 +celery==3.1.24 {% endif %} {% if cookiecutter.use_compressor == "y" %} From 01f80c78573a639964186995f103bb0d2d7bb184 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 5 Oct 2016 15:58:38 +0200 Subject: [PATCH 076/280] Update pillow from 3.3.1 to 3.4.1 (#838) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index f3be5909b..b9aac3621 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ django-crispy-forms==1.6.0 django-model-utils==2.6 # Images -Pillow==3.3.1 +Pillow==3.4.1 # For user registration, either via email or social # Well-built with regular release cycles! From 50b883c7eaedb56ad2d27c2540e2aa874feae887 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 5 Oct 2016 15:58:46 +0200 Subject: [PATCH 077/280] Update pytz from 2016.6.1 to 2016.7 (#835) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index b9aac3621..7f427a0fd 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -42,7 +42,7 @@ psycopg2==2.6.2 awesome-slugify==1.6.5 # Time zones support -pytz==2016.6.1 +pytz==2016.7 # Redis support django-redis==4.5.0 From bb15e5a02e1904471504f4680eac03ad01185768 Mon Sep 17 00:00:00 2001 From: Marlon Date: Wed, 5 Oct 2016 07:01:30 -0700 Subject: [PATCH 078/280] Create 403_csrf.html (#803) This takes advantage of the ability to easily customize the 403 template for CSRF, introduced in Django 1.10. --- .../templates/403_csrf.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html new file mode 100644 index 000000000..c02bd4e9e --- /dev/null +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html @@ -0,0 +1,9 @@ +{% raw %}{% extends "base.html" %} + +{% block title %}Forbidden (403){% endblock %} + +{% block content %} +

Forbidden (403)

+ +

CSRF verification failed. Request aborted.

+{% endblock content %}{% endraw %} From 85756b71911d23860f8b007e85983e38cd0ac98c Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Fri, 7 Oct 2016 13:32:28 -0700 Subject: [PATCH 079/280] Finish first pass at Elastic Beanstalk documentation --- docs/deployment-with-elastic-beanstalk.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst index e445cb5d3..e8aae8853 100644 --- a/docs/deployment-with-elastic-beanstalk.rst +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -37,18 +37,25 @@ If you are not in the right environment, then put yourself in the correct one:: eb use MY_PROJECT_SLUG -TODO: Finish it:: +Set the environment variables. Notes: You will be prompted if the `.env` file is missing. The script will ignore any PostgreSQL values, as RDS uses it's own system:: # Set the environment variables python ebsetenv.py - # Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro) - # Get some coffee, this is going to take a while +Speaking of PostgreSQL, go to the Elasting Beanstalk configuration panel for RDS. Create new RDS database, with these attributes: + +* PostgreSQL +* Version 9.4.9 +* Size db.t2.micro (You can upgrade later) + +(Get some coffee, this is going to take a while) + +Once you have a database specified, deploy again so your instance can pick up the new PostgreSQL values:: - # Deploy again eb deploy - # Take a look +Take a look:: + eb open FAQ From 04a58d5b2146b76c20f9dcbe9b1a4f2bb4dff1e3 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 7 Oct 2016 13:55:15 -0700 Subject: [PATCH 080/280] Removed Heroku instant deploy button --- CHANGELOG.md | 7 +++++ hooks/post_gen_project.py | 4 +-- {{cookiecutter.project_slug}}/README.rst | 3 -- {{cookiecutter.project_slug}}/app.json | 40 ------------------------ 4 files changed, 9 insertions(+), 45 deletions(-) delete mode 100644 {{cookiecutter.project_slug}}/app.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e434884a..948d613ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-10-07] +### Added +- Finished first pass at Elastic Beanstalk docs (@pydanny & @audreyr) +### Deleted +- Removed Heroku instant deploy button (@pydanny) + + ##[2016-09-29] ### Added - Added default `AUTH_PASSWORD_VALIDATORS` configuration, generated by django 1.10 startproject. See [Password Validation docs](https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#module-django.contrib.auth.password_validation") (@luzfcb) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 0736c375d..068d74831 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -115,10 +115,10 @@ def remove_heroku_files(): """ Removes files needed for heroku if it isn't going to be used """ - filenames = ["app.json", "Procfile", "runtime.txt"] + filenames = ["Procfile", "runtime.txt"] if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': filenames.append("requirements.txt") - for filename in ["app.json", "Procfile", "runtime.txt"]: + for filename in ["Procfile", "runtime.txt"]: file_name = os.path.join(PROJECT_DIRECTORY, filename) remove_file(file_name) diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index e06a85ba3..4640f2656 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -122,9 +122,6 @@ The following details how to deploy this application. Heroku ^^^^^^ -.. image:: https://www.herokucdn.com/deploy/button.png - :target: https://heroku.com/deploy - See detailed `cookiecutter-django Heroku documentation`_. .. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html diff --git a/{{cookiecutter.project_slug}}/app.json b/{{cookiecutter.project_slug}}/app.json deleted file mode 100644 index 10d2c9266..000000000 --- a/{{cookiecutter.project_slug}}/app.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "{{cookiecutter.project_slug}}", - "description": "{{cookiecutter.description}}", - "env": { - "BUILDPACK_URL": "https://github.com/heroku/heroku-buildpack-python", - "DJANGO_SETTINGS_MODULE": "config.settings.production", - "DJANGO_SECRET_KEY": { - "description": "A secret key for verifying the integrity of signed cookies.", - "generator": "secret" - }, - "DJANGO_ALLOWED_HOSTS": { - "description": "Comma-separated list of hosts", - "value": ".herokuapp.com" - }, - "DJANGO_ADMIN_URL": { - "description": "A secret URL for the Django admin", - "generator": "secret" - }, - "DJANGO_AWS_ACCESS_KEY_ID": "", - "DJANGO_AWS_SECRET_ACCESS_KEY": "", - "DJANGO_AWS_STORAGE_BUCKET_NAME": "", - "DJANGO_MAILGUN_SERVER_NAME": "", - "DJANGO_MAILGUN_API_KEY": "" - "MAILGUN_SENDER_DOMAIN": ""{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}, - "DJANGO_SENTRY_DSN": ""{%- endif %} - }, - "scripts": { - "postdeploy": "python manage.py migrate" - }, - "addons": [ - { - "plan": "heroku-postgresql:hobby-dev", - "options": { - "version": "{{ cookiecutter.postgresql_version }}" - } - }, - "heroku-redis:hobby-dev", - "mailgun" - ] -} From 52e84608be0911250c4a6125140c7cf70b65ea4d Mon Sep 17 00:00:00 2001 From: Sam Collins Date: Sat, 8 Oct 2016 22:55:02 +0100 Subject: [PATCH 081/280] Added --noinput to migate command (#842) When deploying with a stale content type the migration command can ask for user input which fails the deployment. --- {{cookiecutter.project_slug}}/.ebextensions/40_python.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config index 02636e1ad..111bf1ca8 100644 --- a/{{cookiecutter.project_slug}}/.ebextensions/40_python.config +++ b/{{cookiecutter.project_slug}}/.ebextensions/40_python.config @@ -1,6 +1,6 @@ container_commands: 01_migrate: - command: "source /opt/python/run/venv/bin/activate && python manage.py migrate" + command: "source /opt/python/run/venv/bin/activate && python manage.py migrate --noinput" leader_only: True 02_collectstatic: command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput" From 43971a2c3a2faf68ee8ccd0798c8502a23a56773 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sat, 8 Oct 2016 14:57:16 -0700 Subject: [PATCH 082/280] Contributor update --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.rst | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 948d613ce..70a142fc5 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-10-08] +### Changed +- Elastic Beanstalk: Added --noinput to migrate command (@MightySCollins ) + ## [2015-10-07] ### Added - Finished first pass at Elastic Beanstalk docs (@pydanny & @audreyr) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 8803124f9..4916c6f04 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -119,6 +119,7 @@ Listed in alphabetical order. Roman Afanaskin `@siauPatrick`_ Roman Osipenko `@romanosipenko`_ Russell Davies + Sam Collins `@MightySCollins`_ stepmr `@stepmr`_ Sławek Ehlert `@slafs`_ Srinivas Nyayapati `@shireenrao`_ @@ -216,6 +217,7 @@ Listed in alphabetical order. .. _@andresgz: https://github.com/andresgz .. _@jangeador: https://github.com/jangeador .. _@townie: https://github.com/townie +.. _@MightySCollins: https://github.com/MightySCollins Special Thanks ~~~~~~~~~~~~~~ From ab4686f519ac0a9d826b682297a708367263d3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Sat, 8 Oct 2016 21:43:12 -0300 Subject: [PATCH 083/280] check pending migration (#840) --- tests/test_docker.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 30a27dad3..ced9b1829 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -16,3 +16,6 @@ cd project_name # run the project's tests docker-compose -f dev.yml run django python manage.py test + +# return non-zero status code if there are migrations that have not been created +docker-compose -f dev.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; } From 77ce5f04eec08fd3b675cdc4aadf8126bf2b73b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Muhl?= Date: Mon, 10 Oct 2016 17:39:35 +0200 Subject: [PATCH 084/280] Upgrade django debug toolbar to 1.6 (#844) * Replaced django-debug-toolbar github link with version 1.6 * Contributor update --- CONTRIBUTORS.rst | 2 ++ {{cookiecutter.project_slug}}/requirements/local.txt | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4916c6f04..0611babf3 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -116,6 +116,7 @@ Listed in alphabetical order. Peter Bittner `@bittner`_ Raphael Pierzina `@hackebrot`_ Raony Guimarães Corrêa `@raonyguimaraes`_ + René Muhl `@rm--`_ Roman Afanaskin `@siauPatrick`_ Roman Osipenko `@romanosipenko`_ Russell Davies @@ -197,6 +198,7 @@ Listed in alphabetical order. .. _@oubiga: https://github.com/oubiga .. _@parbhat: https://github.com/parbhat .. _@raonyguimaraes: https://github.com/raonyguimaraes +.. _@rm--: https://github.com/rm-- .. _@romanosipenko: https://github.com/romanosipenko .. _@shireenrao: https://github.com/shireenrao .. _@show0k: https://github.com/show0k diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 236f00de5..e563cb30c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -8,10 +8,7 @@ Werkzeug==0.11.11 django-test-plus==1.0.15 factory_boy==2.7.0 -# Temporary workaround to fix issue https://github.com/pydanny/cookiecutter-django/issues/827 -# It will be removed when django-debug-toolbar publish the new version on pypi --e git+https://github.com/jazzband/django-debug-toolbar.git@637b0b73bc684f6ea600dca5ca1bb1f090fcee93#egg=django-debug-toolbar -#django-debug-toolbar==1.5 +django-debug-toolbar==1.6 # improved REPL ipdb==0.10.1 From 3b3e53b57bfb4b1fe2e7a7b1c3b0cf7865354bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Wed, 12 Oct 2016 10:43:48 -0300 Subject: [PATCH 085/280] fix issue #847 --- {{cookiecutter.project_slug}}/.gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 01406c13a..90ce80dce 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -75,6 +75,4 @@ node_modules/ mailhog {% endif %} -{% if cookiecutter.use_compressor == 'y' %} staticfiles/ -{% endif %} From 02ef6b76a4b09f5b632661d288edb4abd1cea61c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 17 Oct 2016 03:20:09 -0700 Subject: [PATCH 086/280] Update django-crispy-forms from 1.6.0 to 1.6.1 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 7f427a0fd..e00fea570 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -18,7 +18,7 @@ whitenoise==3.2.2 # Forms django-braces==1.9.0 -django-crispy-forms==1.6.0 +django-crispy-forms==1.6.1 # Models django-model-utils==2.6 From 75b7cc964023219383b3c421813ff8cddb27ab10 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 17 Oct 2016 18:56:15 +0200 Subject: [PATCH 087/280] Update tox from 2.3.1 to 2.4.1 (#848) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 43100434d..73e90f9a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ binaryornot==0.4.0 pytest==3.0.3 pep8==1.7.0 pyflakes==1.3.0 -tox==2.3.1 +tox==2.4.1 pytest-cookies==0.2.0 From f6bce5c5f79d1583040a84af9c978d4301b9495a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 17 Oct 2016 18:56:25 +0200 Subject: [PATCH 088/280] Update django-allauth from 0.27.0 to 0.28.0 (#849) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index e00fea570..ec567c465 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,7 @@ Pillow==3.4.1 # For user registration, either via email or social # Well-built with regular release cycles! -django-allauth==0.27.0 +django-allauth==0.28.0 {% if cookiecutter.windows == 'y' -%} # On Windows, you must download/install psycopg2 manually From 25feee54a54401199fcd90726179369b57e5cb27 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Oct 2016 21:47:09 +0200 Subject: [PATCH 089/280] Update pillow from 3.4.1 to 3.4.2 (#857) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index ec567c465..ed964ef2c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ django-crispy-forms==1.6.1 django-model-utils==2.6 # Images -Pillow==3.4.1 +Pillow==3.4.2 # For user registration, either via email or social # Well-built with regular release cycles! From f823f4ae94d3d351a543164922e82bf6cd30d7c5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Oct 2016 21:47:31 +0200 Subject: [PATCH 090/280] Update boto from 2.42.0 to 2.43.0 (#854) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 827f3eeb8..16be10e1f 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.6.0 # Static and Media Storage # ------------------------------------------------ -boto==2.42.0 +boto==2.43.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.2.3 From fb576242a1ce450af43819133fe53e7b89648bf0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Oct 2016 21:47:43 +0200 Subject: [PATCH 091/280] Update raven from 5.27.1 to 5.29.0 (#856) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 16be10e1f..b00ec5eec 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==0.5 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==5.27.1 +raven==5.29.0 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From 85c7ff1288f2b76f544f05eaecfd9196d6a1a682 Mon Sep 17 00:00:00 2001 From: shireenrao Date: Wed, 19 Oct 2016 11:51:53 -0400 Subject: [PATCH 092/280] remove html5.js as source no longer exists (#853) * remove html5.js as source no longer exists * Update the path for html5shiv Added path https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js --- .../{{cookiecutter.project_slug}}/templates/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index e816a208d..4ed49964e 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -7,10 +7,10 @@ - + {% block css %} From 5ab02e6415ef71fadabfce55f8baeb40cb833d88 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 19 Oct 2016 10:11:22 -0700 Subject: [PATCH 093/280] Added the @Parbhat maintained fork to the README --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2f5256edf..95e90afb2 100644 --- a/README.rst +++ b/README.rst @@ -28,7 +28,7 @@ Features * For Django 1.10 * Renders Django projects with 100% starting test coverage -* Twitter Bootstrap_ v4.0.0 - `alpha 4`_ +* Twitter Bootstrap_ v4.0.0 - `alpha 4`_ (`maintained Foundation fork`_ also available) * 12-Factor_ based settings via django-environ_ * Optimized development and production settings * Registration via django-allauth_ @@ -44,6 +44,8 @@ Features * Customizable PostgreSQL version * Experimental support for Amazon Elastic Beanstalk +.. _`maintained Foundation fork`: https://github.com/Parbhat/cookiecutter-django-foundation + Optional Integrations --------------------- From 6eb3776d70a032f065b5ebcb644f26f20f09fec5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 20 Oct 2016 17:08:33 +0200 Subject: [PATCH 094/280] Update raven from 5.29.0 to 5.30.0 (#859) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index b00ec5eec..b4d14fb5a 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==0.5 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==5.29.0 +raven==5.30.0 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From 1d13b1915d9716372889b635c1d9df73e724c943 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 20 Oct 2016 17:08:43 +0200 Subject: [PATCH 095/280] Update django-test-plus to 1.0.16 (#858) * Update django-test-plus from 1.0.15 to 1.0.16 * Update django-test-plus from 1.0.15 to 1.0.16 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e563cb30c..812a01e83 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -5,7 +5,7 @@ django-coverage-plugin==1.3.1 Sphinx==1.4.8 django-extensions==1.7.4 Werkzeug==0.11.11 -django-test-plus==1.0.15 +django-test-plus==1.0.16 factory_boy==2.7.0 django-debug-toolbar==1.6 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 42ed08c56..5578aaca8 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -9,7 +9,7 @@ psycopg2==2.6.2 coverage==4.2 flake8==3.0.4 # pyup: != 2.6.0 -django-test-plus==1.0.15 +django-test-plus==1.0.16 factory_boy==2.7.0 # pytest From 77606bcc9549d8986e7cf28cedf979fd66822c63 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 24 Oct 2016 13:25:05 -0700 Subject: [PATCH 096/280] Update django-braces from 1.9.0 to 1.10.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index ed964ef2c..8792649f3 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -17,7 +17,7 @@ whitenoise==3.2.2 # Forms -django-braces==1.9.0 +django-braces==1.10.0 django-crispy-forms==1.6.1 # Models From e1a7215e988daf750c4a788ebdce4a9617f11e18 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 25 Oct 2016 06:27:47 -0700 Subject: [PATCH 097/280] Update opbeat from 3.4.0 to 3.5.0 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index b4d14fb5a..b149a64b3 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -35,5 +35,5 @@ raven==5.30.0 {% if cookiecutter.use_opbeat == "y" -%} # Opbeat agent for performance monitoring # ----------------------------------------- -opbeat==3.4.0 +opbeat==3.5.0 {%- endif %} From b3c9dc6a3031fcfc726a5de95aba3151d5815c59 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 25 Oct 2016 11:59:52 -0700 Subject: [PATCH 098/280] Update django-anymail from 0.5 to 0.6 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index b4d14fb5a..b4447a640 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,7 +24,7 @@ Collectfast==0.2.3 # Email backends for Mailgun, Postmark, SendGrid and more # ------------------------------------------------------- -django-anymail==0.5 +django-anymail==0.6 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client From 8147f1df4705eb90c1d2eb3f7b4ec98c0ffc04c9 Mon Sep 17 00:00:00 2001 From: Brent Payne Date: Wed, 26 Oct 2016 17:47:33 -0700 Subject: [PATCH 099/280] update raven to version 5.31.0 to avoid runtime error caused by SentryMiddleware when running django wsgi with gunicorn in python 3.5 --- CONTRIBUTORS.rst | 1 + {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 0611babf3..3a068e318 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -58,6 +58,7 @@ Listed in alphabetical order. Benjamin Abel Bo Lopker `@blopker`_ Bouke Haarsma + Brent Payne `@brentpayne`_ @brentpayne Burhan Khalid `@burhan`_ @burhan Catherine Devlin `@catherinedevlin`_ Cédric Gaspoz `@cgaspoz`_ diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index b4d14fb5a..ae788f2f4 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==0.5 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==5.30.0 +raven==5.31.0 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From a37b368668623a6ab46d7b2a6cf2f14395b2086e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 2 Nov 2016 10:10:59 +0100 Subject: [PATCH 100/280] Update django from 1.10.2 to 1.10.3 (#872) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 8792649f3..9993878bd 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.10.2 +django==1.10.3 # Configuration django-environ==0.4.0 From 4212eb5446a06011477ead315d7c3d22298c8b4f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 2 Nov 2016 10:11:38 +0100 Subject: [PATCH 101/280] Update django-anymail from 0.6 to 0.6.1 (#873) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 85ae47368..4c94e3c41 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,7 +24,7 @@ Collectfast==0.2.3 # Email backends for Mailgun, Postmark, SendGrid and more # ------------------------------------------------------- -django-anymail==0.6 +django-anymail==0.6.1 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client From 3a7a75ad9cdda2d5a8c264795c66d5ce185e1185 Mon Sep 17 00:00:00 2001 From: Michael Gecht Date: Wed, 2 Nov 2016 10:12:06 +0100 Subject: [PATCH 102/280] Add documentation for Docker users on Windows (#845) * Added usage notice for Windows users with Docker * Updated CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ docs/developing-locally-docker.rst | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 3a068e318..684ddbe1f 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -111,6 +111,7 @@ Listed in alphabetical order. Matt Warren `@mfwarren`_ Matthew Sisley `@mjsisley`_ Meghan Heintz `@dot2dotseurat`_ + Michael Gecht `@mimischi`_ @_mischi mozillazg `@mozillazg`_ Pablo `@oubiga`_ Parbhat Puri `@parbhat`_ @@ -192,6 +193,7 @@ Listed in alphabetical order. .. _@MathijsHoogland: https://github.com/MathijsHoogland .. _@menzenski: https://github.com/menzenski .. _@mfwarren: https://github.com/mfwarren +.. _@mimischi: https://github.com/mimischi .. _@mjsisley: https://github.com/mjsisley .. _@mozillazg: https://github.com/mozillazg .. _@noisy: https://github.com/noisy diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 65312e8d7..0a14c3ce1 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -20,6 +20,16 @@ If you don't already have it installed, follow the instructions for your OS: .. _`Docker for Windows`: https://docs.docker.com/engine/installation/windows/ .. _`docker-engine`: https://docs.docker.com/engine/installation/ +Attention Windows users +------------- + +Currently PostgreSQL (``psycopg2`` python package) is not installed inside Docker containers for Windows users, while it is required by the generated Django project. To fix this, add ``psycopg2`` to the list of requirements inside ``requirements/base.txt``:: + + # Python-PostgreSQL Database Adapter + psycopg2==2.6.2 + +Doing this will prevent the project from being installed in an Windows-only environment (thus without usage of Docker). If you want to use this project without Docker, make sure to remove ``psycopg2`` from the requirements again. + Build the Stack --------------- From 01fe56aaa206041a684e729c7ea5d9beb7e422b3 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 2 Nov 2016 08:36:39 -0700 Subject: [PATCH 103/280] Update django-redis from 4.5.0 to 4.6.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 9993878bd..4b7a9e4b0 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -45,7 +45,7 @@ awesome-slugify==1.6.5 pytz==2016.7 # Redis support -django-redis==4.5.0 +django-redis==4.6.0 redis>=2.10.5 {% if cookiecutter.use_celery == "y" %} From 4f3e18d0ccae4a50cab53ccf0c71b3a436b41197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Hugon?= Date: Wed, 2 Nov 2016 18:03:52 +0100 Subject: [PATCH 104/280] read the env, so the env works (#863) Spend a whole afternoon tryin to make it works after reading your book... that was the solution --- {{cookiecutter.project_slug}}/config/settings/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index 04998575f..c0c86b397 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -16,6 +16,7 @@ ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}') env = environ.Env() +env.read_env() # APP CONFIGURATION # ------------------------------------------------------------------------------ From 16dd3c498aa3af1553e5437df1e95a61654898c0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 2 Nov 2016 12:20:40 -0700 Subject: [PATCH 105/280] Update opbeat from 3.5.0 to 3.5.1 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 4c94e3c41..85e64a0cf 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -35,5 +35,5 @@ raven==5.31.0 {% if cookiecutter.use_opbeat == "y" -%} # Opbeat agent for performance monitoring # ----------------------------------------- -opbeat==3.5.0 +opbeat==3.5.1 {%- endif %} From 270bcef89c1212597e811d69b41015844bbb8bca Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 2 Nov 2016 15:20:40 -0700 Subject: [PATCH 106/280] Update collectfast from 0.2.3 to 0.3.1 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 4c94e3c41..c72de9267 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.6.0 boto==2.43.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.2.3 +Collectfast==0.3.1 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From 313aff19a139f1d14bfc73599f8789275cda23a9 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Tue, 8 Nov 2016 09:50:51 -0800 Subject: [PATCH 107/280] Enable gzip compression on Elastic Beanstalk per @realpython https://realpython.com/blog/python/deploying-a-django-app-to-aws-elastic-beanstalk/ --- .../.ebextensions/50_apache.config | 3 +++ .../.ebextensions/enable_mod_deflate.conf | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/50_apache.config create mode 100644 {{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf diff --git a/{{cookiecutter.project_slug}}/.ebextensions/50_apache.config b/{{cookiecutter.project_slug}}/.ebextensions/50_apache.config new file mode 100644 index 000000000..672cb625b --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/50_apache.config @@ -0,0 +1,3 @@ +container_commands: + 01_setup_apache: + command: "cp .ebextensions/enable_mod_deflate.conf /etc/httpd/conf.d/enable_mod_deflate.conf" diff --git a/{{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf b/{{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf new file mode 100644 index 000000000..7a77cc234 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.ebextensions/enable_mod_deflate.conf @@ -0,0 +1,25 @@ +# mod_deflate configuration + + # Restrict compression to these MIME types + AddOutputFilterByType DEFLATE text/plain + AddOutputFilterByType DEFLATE text/html + AddOutputFilterByType DEFLATE application/xhtml+xml + AddOutputFilterByType DEFLATE text/xml + AddOutputFilterByType DEFLATE application/xml + AddOutputFilterByType DEFLATE application/xml+rss + AddOutputFilterByType DEFLATE application/x-javascript + AddOutputFilterByType DEFLATE text/javascript + AddOutputFilterByType DEFLATE text/css + # Level of compression (Highest 9 - Lowest 1) + DeflateCompressionLevel 9 + # Netscape 4.x has some problems. + BrowserMatch ^Mozilla/4 gzip-only-text/html + # Netscape 4.06-4.08 have some more problems + BrowserMatch ^Mozilla/4\.0[678] no-gzip + # MSIE masquerades as Netscape, but it is fine + BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html + + # Make sure proxies don't deliver the wrong content + Header append Vary User-Agent env=!dont-vary + + From a05292347c133e62b87319d681d15a995619bc70 Mon Sep 17 00:00:00 2001 From: Jannis Gebauer Date: Mon, 14 Nov 2016 11:52:29 +0100 Subject: [PATCH 108/280] upgrade gevent (#882) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index c7ed6b271..57a0d0ed7 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ psycopg2==2.6.2 # WSGI Handler # ------------------------------------------------ -gevent==1.1.2 +gevent==1.2a1 gunicorn==19.6.0 # Static and Media Storage From 629ab3a956034e9d9a209fd09b8025f1a85b4fbb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Nov 2016 11:52:38 +0100 Subject: [PATCH 109/280] Update pytest from 3.0.3 to 3.0.4 (#883) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 73e90f9a6..db72ef948 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.11 binaryornot==0.4.0 # Testing -pytest==3.0.3 +pytest==3.0.4 pep8==1.7.0 pyflakes==1.3.0 tox==2.4.1 From 74e8296b8e3d475d3116150f01503c715990be1a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Nov 2016 11:52:45 +0100 Subject: [PATCH 110/280] Update django-environ from 0.4.0 to 0.4.1 (#885) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 4b7a9e4b0..e9669f159 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ wheel==0.29.0 django==1.10.3 # Configuration -django-environ==0.4.0 +django-environ==0.4.1 {% if cookiecutter.use_whitenoise == 'y' -%} whitenoise==3.2.2 {%- endif %} From 6ec8583f602d4d75e400b2e5afc02e2ae4ab0c7d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 16 Nov 2016 09:32:44 +0100 Subject: [PATCH 111/280] Update raven from 5.31.0 to 5.32.0 (#889) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 57a0d0ed7..a8fbf4682 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -29,7 +29,7 @@ django-anymail==0.6.1 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client # -------------------------- -raven==5.31.0 +raven==5.32.0 {%- endif %} {% if cookiecutter.use_opbeat == "y" -%} From b32a2ed8aaf2391f1ec7f1e953bc757b5883d65b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 16 Nov 2016 09:32:50 +0100 Subject: [PATCH 112/280] Update flake8 to 3.2.0 (#888) * Update flake8 from 3.0.4 to 3.2.0 * Update flake8 from 3.0.4 to 3.2.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index db72ef948..1052e2179 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cookiecutter==1.4.0 -flake8==3.0.4 # pyup: != 2.6.0 +flake8==3.2.0 # pyup: != 2.6.0 sh==1.11 binaryornot==0.4.0 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 5578aaca8..855aef3a0 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -8,7 +8,7 @@ psycopg2==2.6.2 {%- endif %} coverage==4.2 -flake8==3.0.4 # pyup: != 2.6.0 +flake8==3.2.0 # pyup: != 2.6.0 django-test-plus==1.0.16 factory_boy==2.7.0 From d00074d27bc5c739ba611b08081411a03814e5b0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 21 Nov 2016 16:07:41 +0100 Subject: [PATCH 113/280] Update pytest-django to 3.1.1 (#897) * Update pytest-django from 3.0.0 to 3.1.1 * Update pytest-django from 3.0.0 to 3.1.1 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 812a01e83..41f830f62 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,5 +13,5 @@ django-debug-toolbar==1.6 # improved REPL ipdb==0.10.1 -pytest-django==3.0.0 +pytest-django==3.1.1 pytest-sugar==0.7.1 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 855aef3a0..2dc42bd4c 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -13,5 +13,5 @@ django-test-plus==1.0.16 factory_boy==2.7.0 # pytest -pytest-django==3.0.0 +pytest-django==3.1.1 pytest-sugar==0.7.1 From d5805a71b480368cf37801821ad1e6e5134268cb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 23 Nov 2016 11:36:24 +0100 Subject: [PATCH 114/280] Update tox from 2.4.1 to 2.5.0 (#890) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1052e2179..9284ad971 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ binaryornot==0.4.0 pytest==3.0.4 pep8==1.7.0 pyflakes==1.3.0 -tox==2.4.1 +tox==2.5.0 pytest-cookies==0.2.0 From efad68867124e067ee9278bb7aa500b5f3834fba Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 23 Nov 2016 11:36:31 +0100 Subject: [PATCH 115/280] Update flake8 to 3.2.1 (#900) * Update flake8 from 3.2.0 to 3.2.1 * Update flake8 from 3.2.0 to 3.2.1 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9284ad971..889388219 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cookiecutter==1.4.0 -flake8==3.2.0 # pyup: != 2.6.0 +flake8==3.2.1 # pyup: != 2.6.0 sh==1.11 binaryornot==0.4.0 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 2dc42bd4c..704a508c9 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -8,7 +8,7 @@ psycopg2==2.6.2 {%- endif %} coverage==4.2 -flake8==3.2.0 # pyup: != 2.6.0 +flake8==3.2.1 # pyup: != 2.6.0 django-test-plus==1.0.16 factory_boy==2.7.0 From ea4c3f49aa56b5cbe4bad9f21e3b254378097db7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 23 Nov 2016 11:36:40 +0100 Subject: [PATCH 116/280] Update django-allauth from 0.28.0 to 0.29.0 (#898) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index e9669f159..56743c214 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,7 @@ Pillow==3.4.2 # For user registration, either via email or social # Well-built with regular release cycles! -django-allauth==0.28.0 +django-allauth==0.29.0 {% if cookiecutter.windows == 'y' -%} # On Windows, you must download/install psycopg2 manually From 75c84b870dc38a22bf2568e684edbe14063c342f Mon Sep 17 00:00:00 2001 From: sreyemnayr Date: Wed, 23 Nov 2016 04:36:58 -0600 Subject: [PATCH 117/280] Add PostgreSQL 9.6 as an option (#891) * Added PostgreSQL 9.6 option * Spacing --- cookiecutter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index bf729b678..84bbe5ef0 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -19,7 +19,7 @@ "use_heroku": "n", "use_elasticbeanstalk_experimental": "n", "use_compressor": "n", - "postgresql_version": ["9.5", "9.4", "9.3", "9.2"], + "postgresql_version": ["9.6", "9.5", "9.4", "9.3", "9.2"], "js_task_runner": ["Gulp", "Grunt", "None"], "use_lets_encrypt": "n", "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] From 613587f88920afca7093c9e301020ed6e5d2e275 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 24 Nov 2016 08:31:40 +0100 Subject: [PATCH 118/280] Update sphinx from 1.4.8 to 1.4.9 (#901) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 41f830f62..00145eb21 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.2 django-coverage-plugin==1.3.1 -Sphinx==1.4.8 +Sphinx==1.4.9 django-extensions==1.7.4 Werkzeug==0.11.11 django-test-plus==1.0.16 From 770abf960dab3a2d3a69f4a7745145081c6303b1 Mon Sep 17 00:00:00 2001 From: Paul Brown Date: Thu, 24 Nov 2016 10:21:47 -0600 Subject: [PATCH 119/280] nginx-secure.conf mixed tabs/spaces to only spaces (#902) --- .../compose/nginx/nginx-secure.conf | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/nginx/nginx-secure.conf b/{{cookiecutter.project_slug}}/compose/nginx/nginx-secure.conf index cd0fe9a38..10a53eec1 100755 --- a/{{cookiecutter.project_slug}}/compose/nginx/nginx-secure.conf +++ b/{{cookiecutter.project_slug}}/compose/nginx/nginx-secure.conf @@ -11,7 +11,7 @@ events { http { - include /etc/nginx/mime.types; + include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -32,57 +32,57 @@ http { upstream app { server django:5000; } - server { - listen 80; - server_name ___my.example.com___ www.___my.example.com___; + server { + listen 80; + server_name ___my.example.com___ www.___my.example.com___; - location /.well-known/acme-challenge { - # Since the certbot container isn't up constantly, need to resolve ip dynamically using docker's dns - resolver ___NAMESERVER___; - set $certbot_addr_port certbot:80; - proxy_pass http://$certbot_addr_port; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $remote_addr; + location /.well-known/acme-challenge { + # Since the certbot container isn't up constantly, need to resolve ip dynamically using docker's dns + resolver ___NAMESERVER___; + set $certbot_addr_port certbot:80; + proxy_pass http://$certbot_addr_port; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; - } + } - location / { - return 301 https://$server_name$request_uri; - } + location / { + return 301 https://$server_name$request_uri; + } - } + } - server { - listen 443; - server_name ___my.example.com___ www.___my.example.com___; + server { + listen 443; + server_name ___my.example.com___ www.___my.example.com___; - ssl on; - ssl_certificate /etc/letsencrypt/live/___my.example.com___/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/___my.example.com___/privkey.pem; - ssl_session_timeout 5m; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; - ssl_prefer_server_ciphers on; + ssl on; + ssl_certificate /etc/letsencrypt/live/___my.example.com___/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/___my.example.com___/privkey.pem; + ssl_session_timeout 5m; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; + ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - ssl_dhparam /etc/ssl/private/dhparams.pem; + ssl_session_cache shared:SSL:10m; + ssl_dhparam /etc/ssl/private/dhparams.pem; - location /.well-known/acme-challenge { - resolver ___NAMESERVER___; - set $certbot_addr_port certbot:443; - proxy_pass http://$certbot_addr_port; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Forwarded-Proto https; - } + location /.well-known/acme-challenge { + resolver ___NAMESERVER___; + set $certbot_addr_port certbot:443; + proxy_pass http://$certbot_addr_port; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto https; + } - location / { + location / { # checks for static file, if not found proxy to app try_files $uri @proxy_to_app; } - # cookiecutter-django app - location @proxy_to_app { + # cookiecutter-django app + location @proxy_to_app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; @@ -91,6 +91,6 @@ http { } - } + } } From 0919cc438b6b0ef80978842834daf51b00d5113c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 28 Nov 2016 20:12:01 -0300 Subject: [PATCH 120/280] Update common.py --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index c0c86b397..83c94e22f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -16,7 +16,7 @@ ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}') env = environ.Env() -env.read_env() +env.read_env(str(ROOT_DIR.path('.env'))) # APP CONFIGURATION # ------------------------------------------------------------------------------ From a5c179594dfac2616187e496a8f87ee00c4fd869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 28 Nov 2016 20:20:56 -0300 Subject: [PATCH 121/280] revert last commit --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index 83c94e22f..c0c86b397 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -16,7 +16,7 @@ ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}') env = environ.Env() -env.read_env(str(ROOT_DIR.path('.env'))) +env.read_env() # APP CONFIGURATION # ------------------------------------------------------------------------------ From 85dfec3ce3f5c9ac33cf735f08c349fe7953fd19 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 29 Nov 2016 18:06:50 +0100 Subject: [PATCH 122/280] Update pytest-django to 3.1.2 (#903) * Update pytest-django from 3.1.1 to 3.1.2 * Update pytest-django from 3.1.1 to 3.1.2 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 00145eb21..e8ad219fd 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,5 +13,5 @@ django-debug-toolbar==1.6 # improved REPL ipdb==0.10.1 -pytest-django==3.1.1 +pytest-django==3.1.2 pytest-sugar==0.7.1 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 704a508c9..759deb1c1 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -13,5 +13,5 @@ django-test-plus==1.0.16 factory_boy==2.7.0 # pytest -pytest-django==3.1.1 +pytest-django==3.1.2 pytest-sugar==0.7.1 From 605c7eae63291c9cbaa16e4b57d6790647dcc3b5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 29 Nov 2016 18:07:34 +0100 Subject: [PATCH 123/280] Update sh from 1.11 to 1.12.2 (#913) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 889388219..204942333 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.4.0 flake8==3.2.1 # pyup: != 2.6.0 -sh==1.11 +sh==1.12.2 binaryornot==0.4.0 # Testing From 59948514ab684896a0bd1d8cf9a248f0ad3a1025 Mon Sep 17 00:00:00 2001 From: Tim Freund Date: Wed, 30 Nov 2016 17:32:38 -0500 Subject: [PATCH 124/280] Update doc links from getsentry.com to sentry.io (#917) Sentry changed their name and URLs: https://blog.sentry.io/2016/08/30/sentry-io.html Links in the cookiecutter-django project are updated to reflect the new locations. --- CONTRIBUTORS.rst | 2 ++ README.rst | 2 +- {{cookiecutter.project_slug}}/README.rst | 2 +- {{cookiecutter.project_slug}}/config/settings/production.py | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 684ddbe1f..6905454d1 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -130,6 +130,7 @@ Listed in alphabetical order. Sule Marshall `@suledev`_ Taylor Baldwin Théo Segonds `@show0k`_ + Tim Freund `@timfreund`_ Tom Atkins `@knitatoms`_ Tom Offermann Travis McNeill `@Travistock`_ @tavistock_esq @@ -211,6 +212,7 @@ Listed in alphabetical order. .. _@ssteinerX: https://github.com/ssteinerx .. _@stepmr: https://github.com/stepmr .. _@suledev: https://github.com/suledev +.. _@timfreund: https://github.com/timfreund .. _@Travistock: https://github.com/Tavistock .. _@trungdong: https://github.com/trungdong .. _@viviangb: httpsL//github.com/viviangb diff --git a/README.rst b/README.rst index 95e90afb2..6a114aefa 100644 --- a/README.rst +++ b/README.rst @@ -70,7 +70,7 @@ Optional Integrations .. _Celery: http://www.celeryproject.org/ .. _Anymail: https://github.com/anymail/django-anymail .. _MailHog: https://github.com/mailhog/MailHog -.. _Sentry: https://getsentry.com/welcome/ +.. _Sentry: https://sentry.io/welcome/ .. _docker-compose: https://github.com/docker/compose .. _Opbeat: https://opbeat.com/ .. _PythonAnywhere: https://www.pythonanywhere.com/ diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 4640f2656..0248eee39 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -107,7 +107,7 @@ The email server will exit when you exit the Grunt task on the CLI with Ctrl+C. Sentry ^^^^^^ -Sentry is an error logging aggregator service. You can sign up for a free account at https://getsentry.com/signup/?code=cookiecutter or download and host it yourself. +Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/?code=cookiecutter or download and host it yourself. The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application. You must set the DSN url in production. diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 7fa726f6d..c1fccc95b 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -35,7 +35,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') {%- if cookiecutter.use_sentry_for_error_reporting == 'y' %} # raven sentry client -# See https://docs.getsentry.com/hosted/clients/python/integrations/django/ +# See https://docs.sentry.io/clients/python/integrations/django/ INSTALLED_APPS += ('raven.contrib.django.raven_compat', ) {% endif %} {%- if cookiecutter.use_whitenoise == 'y' %} From 269efc3f45c0150768f2ce04802cb52823170e25 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 1 Dec 2016 11:19:49 +0100 Subject: [PATCH 125/280] Update sh from 1.12.2 to 1.12.5 (#919) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 204942333..227fba223 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.4.0 flake8==3.2.1 # pyup: != 2.6.0 -sh==1.12.2 +sh==1.12.5 binaryornot==0.4.0 # Testing From 110f0f6ce88b22fe4de71d20cf46ec8d8941acf0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 1 Dec 2016 11:19:57 +0100 Subject: [PATCH 126/280] Update django-extensions from 1.7.4 to 1.7.5 (#904) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e8ad219fd..3df762f8b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -3,7 +3,7 @@ coverage==4.2 django-coverage-plugin==1.3.1 Sphinx==1.4.9 -django-extensions==1.7.4 +django-extensions==1.7.5 Werkzeug==0.11.11 django-test-plus==1.0.16 factory_boy==2.7.0 From 6c4085fce4c9bba980867bffb616a6b9816c85ce Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Dec 2016 05:43:54 +0100 Subject: [PATCH 127/280] Update django from 1.10.3 to 1.10.4 (#920) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 56743c214..39f868b2f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.10.3 +django==1.10.4 # Configuration django-environ==0.4.1 From 275e0b4b8cb8e58a524aab7e06145fdc0af99e14 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Dec 2016 05:44:10 +0100 Subject: [PATCH 128/280] Update sh from 1.12.5 to 1.12.6 (#922) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 227fba223..6b497fd0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.4.0 flake8==3.2.1 # pyup: != 2.6.0 -sh==1.12.5 +sh==1.12.6 binaryornot==0.4.0 # Testing From 7d4cfee45c24939ad972688f235c6130b72b7125 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Dec 2016 05:44:15 +0100 Subject: [PATCH 129/280] Update sphinx from 1.4.9 to 1.5 (#923) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 3df762f8b..bd07432b4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.2 django-coverage-plugin==1.3.1 -Sphinx==1.4.9 +Sphinx==1.5 django-extensions==1.7.5 Werkzeug==0.11.11 django-test-plus==1.0.16 From 75d8827681cc1e6419f1e7762863a9dffe5c2a2a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Dec 2016 05:44:20 +0100 Subject: [PATCH 130/280] Update pytest from 3.0.4 to 3.0.5 (#924) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6b497fd0e..a9f14d35f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.12.6 binaryornot==0.4.0 # Testing -pytest==3.0.4 +pytest==3.0.5 pep8==1.7.0 pyflakes==1.3.0 tox==2.5.0 From 98a2e1705aea6b7c5494852837d182011a0eb0b6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Dec 2016 05:44:24 +0100 Subject: [PATCH 131/280] Update pytz from 2016.7 to 2016.10 (#925) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 39f868b2f..915825e49 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -42,7 +42,7 @@ psycopg2==2.6.2 awesome-slugify==1.6.5 # Time zones support -pytz==2016.7 +pytz==2016.10 # Redis support django-redis==4.6.0 From 2838789560439126b062980ceddd0460adfb572c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 9 Dec 2016 04:14:18 +0100 Subject: [PATCH 132/280] Update sh from 1.12.6 to 1.12.7 (#929) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a9f14d35f..33c0f9b6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.4.0 flake8==3.2.1 # pyup: != 2.6.0 -sh==1.12.6 +sh==1.12.7 binaryornot==0.4.0 # Testing From 5db3b39c19076a0595e11c64c76510b4d75fb588 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 9 Dec 2016 04:15:51 +0100 Subject: [PATCH 133/280] Update boto from 2.43.0 to 2.44.0 (#931) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index a8fbf4682..4fa542d5b 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.6.0 # Static and Media Storage # ------------------------------------------------ -boto==2.43.0 +boto==2.44.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.3.1 From 37a359bd41d19ee5f0ff685e13f3cf726f0154ac Mon Sep 17 00:00:00 2001 From: Jimmy Gitonga Date: Fri, 9 Dec 2016 22:37:06 +0300 Subject: [PATCH 134/280] Update CONTRIBUTORS.rst (#935) --- CONTRIBUTORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 6905454d1..414d2a33b 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -89,6 +89,7 @@ Listed in alphabetical order. Ian Lee `@IanLee1521`_ Jan Van Bruggen `@jvanbrug`_ Jens Nilsson `@phiberjenz`_ + Jimmy Gitonga `@afrowave`_ @afrowave Julien Almarcha `@sladinji`_ Julio Castillo `@juliocc`_ Kaido Kert `@kaidokert`_ From c67b171139f407a4ff686baa46d845e83b153573 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 16 Dec 2016 09:24:34 +0100 Subject: [PATCH 135/280] Update boto from 2.44.0 to 2.45.0 (#943) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 4fa542d5b..26846268f 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -16,7 +16,7 @@ gunicorn==19.6.0 # Static and Media Storage # ------------------------------------------------ -boto==2.44.0 +boto==2.45.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.3.1 From 0a37aa57bd8680a291df82bd933a89ccdcd18667 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 16 Dec 2016 09:24:42 +0100 Subject: [PATCH 136/280] Update sphinx from 1.5 to 1.5.1 (#940) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index bd07432b4..c18094d7b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.2 django-coverage-plugin==1.3.1 -Sphinx==1.5 +Sphinx==1.5.1 django-extensions==1.7.5 Werkzeug==0.11.11 django-test-plus==1.0.16 From 0abfa781f798fb2246f7a895791d2dad23249399 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 16 Dec 2016 09:24:50 +0100 Subject: [PATCH 137/280] Update gevent from 1.2a1 to 1.2a2 (#933) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 26846268f..a0e3051e1 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ psycopg2==2.6.2 # WSGI Handler # ------------------------------------------------ -gevent==1.2a1 +gevent==1.2a2 gunicorn==19.6.0 # Static and Media Storage From dc559f76498edd90e6ee5444231905d25fb40097 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 17 Dec 2016 12:07:38 +0100 Subject: [PATCH 138/280] Update sh from 1.12.7 to 1.12.8 (#946) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 33c0f9b6f..763a2e854 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.4.0 flake8==3.2.1 # pyup: != 2.6.0 -sh==1.12.7 +sh==1.12.8 binaryornot==0.4.0 # Testing From 7bdc95818a21457cd5da1640924ecfa142e6f576 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 17 Dec 2016 12:07:47 +0100 Subject: [PATCH 139/280] Update factory-boy to 2.8.1 (#947) * Update factory-boy from 2.7.0 to 2.8.1 * Update factory-boy from 2.7.0 to 2.8.1 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index c18094d7b..f208fe7cf 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -6,7 +6,7 @@ Sphinx==1.5.1 django-extensions==1.7.5 Werkzeug==0.11.11 django-test-plus==1.0.16 -factory_boy==2.7.0 +factory-boy==2.8.1 django-debug-toolbar==1.6 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 759deb1c1..14f7c391c 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -10,7 +10,7 @@ psycopg2==2.6.2 coverage==4.2 flake8==3.2.1 # pyup: != 2.6.0 django-test-plus==1.0.16 -factory_boy==2.7.0 +factory-boy==2.8.1 # pytest pytest-django==3.1.2 From f00acba613a03494a8b35bd1d2a7b87415885357 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 17 Dec 2016 12:07:57 +0100 Subject: [PATCH 140/280] Update collectfast from 0.3.1 to 0.4.0 (#948) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index a0e3051e1..f169523b7 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.6.0 boto==2.45.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.3.1 +Collectfast==0.4.0 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From 8f1a6e20e460d0cdc89e37e2aee3648e2b079fec Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 18 Dec 2016 23:13:09 +0100 Subject: [PATCH 141/280] Update cookiecutter from 1.4.0 to 1.5.0 (#952) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 763a2e854..a46890d72 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==1.4.0 +cookiecutter==1.5.0 flake8==3.2.1 # pyup: != 2.6.0 sh==1.12.8 binaryornot==0.4.0 From cf8c05265768914e71e02ba874013f5c02b89a25 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2016 15:49:29 +0100 Subject: [PATCH 142/280] Update opbeat from 3.5.1 to 3.5.2 (#955) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index f169523b7..81f9a31f8 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -35,5 +35,5 @@ raven==5.32.0 {% if cookiecutter.use_opbeat == "y" -%} # Opbeat agent for performance monitoring # ----------------------------------------- -opbeat==3.5.1 +opbeat==3.5.2 {%- endif %} From d25f35a90a4c0964b2c45a434f06cd185f62b072 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 28 Dec 2016 22:32:56 +0100 Subject: [PATCH 143/280] Update coverage to 4.3.1 (#962) * Update coverage from 4.2 to 4.3.1 * Update coverage from 4.2 to 4.3.1 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index f208fe7cf..28ebb5dfc 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,6 +1,6 @@ # Local development dependencies go here -r base.txt -coverage==4.2 +coverage==4.3.1 django-coverage-plugin==1.3.1 Sphinx==1.5.1 django-extensions==1.7.5 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 14f7c391c..4932f3df1 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -7,7 +7,7 @@ psycopg2==2.6.2 {%- endif %} -coverage==4.2 +coverage==4.3.1 flake8==3.2.1 # pyup: != 2.6.0 django-test-plus==1.0.16 factory-boy==2.8.1 From ed0ce0d630cf24d9273c68ee144766631879b9a6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 28 Dec 2016 22:33:07 +0100 Subject: [PATCH 144/280] Update gevent from 1.2a2 to 1.2.0 (#957) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 81f9a31f8..92bca9ddc 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ psycopg2==2.6.2 # WSGI Handler # ------------------------------------------------ -gevent==1.2a2 +gevent==1.2.0 gunicorn==19.6.0 # Static and Media Storage From a838a7c90ce7ebc39478f5b6ca1f0aad769bfdce Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 28 Dec 2016 22:33:21 +0100 Subject: [PATCH 145/280] Update werkzeug from 0.11.11 to 0.11.13 (#960) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 28ebb5dfc..7e00601df 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -4,7 +4,7 @@ coverage==4.3.1 django-coverage-plugin==1.3.1 Sphinx==1.5.1 django-extensions==1.7.5 -Werkzeug==0.11.11 +Werkzeug==0.11.13 django-test-plus==1.0.16 factory-boy==2.8.1 From 28a512d0adbcb0ad123ef96026dad89e3f02b830 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 28 Dec 2016 22:33:35 +0100 Subject: [PATCH 146/280] Update pytest-sugar to 0.8.0 (#963) * Update pytest-sugar from 0.7.1 to 0.8.0 * Update pytest-sugar from 0.7.1 to 0.8.0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 7e00601df..f73417d78 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,4 +14,4 @@ django-debug-toolbar==1.6 ipdb==0.10.1 pytest-django==3.1.2 -pytest-sugar==0.7.1 +pytest-sugar==0.8.0 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 4932f3df1..f5090f050 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -14,4 +14,4 @@ factory-boy==2.8.1 # pytest pytest-django==3.1.2 -pytest-sugar==0.7.1 +pytest-sugar==0.8.0 From cd463b29dab66dacbccc204e83ac96fd1523e9f6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 30 Dec 2016 23:05:02 +0100 Subject: [PATCH 147/280] Update collectfast from 0.4.0 to 0.4.1 (#966) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 92bca9ddc..f1e8da9f2 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.6.0 boto==2.45.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.4.0 +Collectfast==0.4.1 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From 79371f4b00285b5e9b4e882b9cfd772af821da0c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 30 Dec 2016 23:05:16 +0100 Subject: [PATCH 148/280] Update pyflakes from 1.3.0 to 1.4.0 (#967) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a46890d72..42dbe5182 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,6 @@ binaryornot==0.4.0 # Testing pytest==3.0.5 pep8==1.7.0 -pyflakes==1.3.0 +pyflakes==1.4.0 tox==2.5.0 pytest-cookies==0.2.0 From b905f066bee280b1e5d1251a250fd0dcca33c8f3 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2017 13:53:17 +0100 Subject: [PATCH 149/280] Update django-allauth from 0.29.0 to 0.30.0 (#973) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 915825e49..da24f494b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,7 @@ Pillow==3.4.2 # For user registration, either via email or social # Well-built with regular release cycles! -django-allauth==0.29.0 +django-allauth==0.30.0 {% if cookiecutter.windows == 'y' -%} # On Windows, you must download/install psycopg2 manually From 067e40d0983963bae631e3a36261d943bff9c3bd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2017 13:53:27 +0100 Subject: [PATCH 150/280] Update django-anymail from 0.6.1 to 0.7 (#970) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index f1e8da9f2..f0d81fc3d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,7 +24,7 @@ Collectfast==0.4.1 # Email backends for Mailgun, Postmark, SendGrid and more # ------------------------------------------------------- -django-anymail==0.6.1 +django-anymail==0.7 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client From ef5417c82b07e516e13a9ad3d65d6752e48a223d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2017 13:53:36 +0100 Subject: [PATCH 151/280] Update werkzeug from 0.11.13 to 0.11.15 (#969) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index f73417d78..42e0a5938 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -4,7 +4,7 @@ coverage==4.3.1 django-coverage-plugin==1.3.1 Sphinx==1.5.1 django-extensions==1.7.5 -Werkzeug==0.11.13 +Werkzeug==0.11.15 django-test-plus==1.0.16 factory-boy==2.8.1 From 8910552ab69c8e693dcb619b3b380a66c55dc5a4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2017 13:53:46 +0100 Subject: [PATCH 152/280] Update pillow from 3.4.2 to 4.0.0 (#976) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index da24f494b..ae1696cfb 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ django-crispy-forms==1.6.1 django-model-utils==2.6 # Images -Pillow==3.4.2 +Pillow==4.0.0 # For user registration, either via email or social # Well-built with regular release cycles! From d9edcbbd27eade01be785035b936217a3a0059f1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2017 13:53:57 +0100 Subject: [PATCH 153/280] Update django-redis from 4.6.0 to 4.7.0 (#977) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index ae1696cfb..1c05ad8a9 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -45,7 +45,7 @@ awesome-slugify==1.6.5 pytz==2016.10 # Redis support -django-redis==4.6.0 +django-redis==4.7.0 redis>=2.10.5 {% if cookiecutter.use_celery == "y" %} From ff067ff31d6872dcbc5290ce5069cc53f10ffdc9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2017 13:54:07 +0100 Subject: [PATCH 154/280] Update whitenoise from 3.2.2 to 3.2.3 (#978) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 1c05ad8a9..8eb187529 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ django==1.10.4 # Configuration django-environ==0.4.1 {% if cookiecutter.use_whitenoise == 'y' -%} -whitenoise==3.2.2 +whitenoise==3.2.3 {%- endif %} From a87858a41352289548dd68e8aeddea0aab694851 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 4 Jan 2017 12:52:37 -0800 Subject: [PATCH 155/280] Update django from 1.10.4 to 1.10.5 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 8eb187529..033d88ff5 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -7,7 +7,7 @@ wheel==0.29.0 {%- endif %} # Bleeding edge Django -django==1.10.4 +django==1.10.5 # Configuration django-environ==0.4.1 From a6f2dd3a0a5a248bbda81d416972e86b5fcc4abd Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 6 Jan 2017 11:30:03 -0800 Subject: [PATCH 156/280] Update README.rst --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 6a114aefa..b27ab9da5 100644 --- a/README.rst +++ b/README.rst @@ -16,12 +16,14 @@ Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting pr * Documentation: https://cookiecutter-django.readthedocs.io/en/latest/ * See Troubleshooting_ for common errors and obstacles +* If you have problems with Cookiecutter Django, please open issues_ before sending emails to the maintainers. You will get a much, MUCH faster response. .. _cookiecutter: https://github.com/audreyr/cookiecutter .. _Troubleshooting: https://cookiecutter-django.readthedocs.io/en/latest/troubleshooting.html .. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 +.. _issues: https://github.com/pydanny/cookiecutter-django/issues/new Features --------- From ced25f1f39ebab53c152a4b16067492e9c200f8a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 9 Jan 2017 10:31:11 +0100 Subject: [PATCH 157/280] Update sh from 1.12.8 to 1.12.9 (#980) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 42dbe5182..a42834e8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cookiecutter==1.5.0 flake8==3.2.1 # pyup: != 2.6.0 -sh==1.12.8 +sh==1.12.9 binaryornot==0.4.0 # Testing From a542a7e51c3a737cf69306567139b6e51e6d6110 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 9 Jan 2017 10:31:21 +0100 Subject: [PATCH 158/280] Update collectfast from 0.4.1 to 0.5.0 (#981) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index f0d81fc3d..c47cae2a1 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.6.0 boto==2.45.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.4.1 +Collectfast==0.5.0 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From 2af079f7aa8ae480afa7e3a122b9186935274c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 9 Jan 2017 15:35:13 -0300 Subject: [PATCH 159/280] load .env file if DJANGO_READ_DOT_ENV_FILE is True --- .../config/settings/common.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index c0c86b397..34ff52d96 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -16,7 +16,21 @@ ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}') env = environ.Env() -env.read_env() + +# Load operating system environment variables and then prepare to use them +env = environ.Env() + +# .env file, should load only in development environment +READ_DOT_ENV_FILE = env('DJANGO_READ_DOT_ENV_FILE', default=False) + +if READ_DOT_ENV_FILE: + # Operating System Environment variables have precende over variables defined in the .env file, + # that is to say variables from the .env files will only be used if not defined + # as environment variables. + env_file = str(ROOT_DIR.path('.env')) + print('Loading : {}'.format(env_file)) + env.read_env(env_file) + print('The .env file has been loaded. See common.py for more information') # APP CONFIGURATION # ------------------------------------------------------------------------------ From 06603dda17a500ba8a63b1184168e0712c43dc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 9 Jan 2017 15:39:27 -0300 Subject: [PATCH 160/280] fix W291 trailing whitespace on common.py --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index 34ff52d96..5afa7d993 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -24,7 +24,7 @@ env = environ.Env() READ_DOT_ENV_FILE = env('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: - # Operating System Environment variables have precende over variables defined in the .env file, + # Operating System Environment variables have precende over variables defined in the .env file, # that is to say variables from the .env files will only be used if not defined # as environment variables. env_file = str(ROOT_DIR.path('.env')) From b0c771b6457a1c2e1983e78afd27b15193ee5f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 9 Jan 2017 15:53:30 -0300 Subject: [PATCH 161/280] include DJANGO_READ_DOT_ENV_FILE on env.example --- {{cookiecutter.project_slug}}/env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/env.example b/{{cookiecutter.project_slug}}/env.example index 66a3570d7..138b75fd9 100644 --- a/{{cookiecutter.project_slug}}/env.example +++ b/{{cookiecutter.project_slug}}/env.example @@ -4,6 +4,7 @@ POSTGRES_PASSWORD=mysecretpass POSTGRES_USER=postgresuser # General settings +# DJANGO_READ_DOT_ENV_FILE=True DJANGO_ADMIN_URL= DJANGO_SETTINGS_MODULE=config.settings.production DJANGO_SECRET_KEY=CHANGEME!!! From 10fa9065998346176ec1bb9eedf20a8a4b50105f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Mon, 9 Jan 2017 16:02:53 -0300 Subject: [PATCH 162/280] add DJANGO_READ_DOT_ENV_FILE to settings docs --- docs/settings.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/settings.rst b/docs/settings.rst index eb6e92a45..893a47e90 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -3,7 +3,14 @@ Settings This project relies extensively on environment settings which **will not work with Apache/mod_wsgi setups**. It has been deployed successfully with both Gunicorn/Nginx and even uWSGI/Nginx. -For configuration purposes, the following table maps environment variables to their Django setting: +For configuration purposes, the following table maps environment variables to their Django setting and project settings: + + +======================================= =========================== ============================================== ====================================================================== +Environment Variable Django Setting Development Default Production Default +======================================= =========================== ============================================== ====================================================================== +DJANGO_READ_DOT_ENV_FILE READ_DOT_ENV_FILE False False +======================================= =========================== ============================================== ====================================================================== ======================================= =========================== ============================================== ====================================================================== From a2a2a517a1e000faaadb5a41650c34217b970e3f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 11 Jan 2017 08:45:17 +0100 Subject: [PATCH 163/280] Update collectfast from 0.5.0 to 0.5.1 (#988) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index c47cae2a1..419f335c9 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.6.0 boto==2.45.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.5.0 +Collectfast==0.5.1 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From 580d90a4beb1a572d2fd6929fab2c2f1db981d56 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 11 Jan 2017 08:45:28 +0100 Subject: [PATCH 164/280] Update pyflakes from 1.4.0 to 1.5.0 (#986) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a42834e8a..87a6bf50c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,6 @@ binaryornot==0.4.0 # Testing pytest==3.0.5 pep8==1.7.0 -pyflakes==1.4.0 +pyflakes==1.5.0 tox==2.5.0 pytest-cookies==0.2.0 From b61b985527f63a43f486870f0a1fcb6b910d98e9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 12 Jan 2017 16:05:20 +0100 Subject: [PATCH 165/280] Update gevent from 1.2.0 to 1.2.1 (#991) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 419f335c9..8714ec4a3 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ psycopg2==2.6.2 # WSGI Handler # ------------------------------------------------ -gevent==1.2.0 +gevent==1.2.1 gunicorn==19.6.0 # Static and Media Storage From 3a337e4350eb524bfd3c8f0832c19fc190625ab0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 12 Jan 2017 16:05:31 +0100 Subject: [PATCH 166/280] Update django-model-utils from 2.6 to 2.6.1 (#990) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 033d88ff5..c32a03241 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -21,7 +21,7 @@ django-braces==1.10.0 django-crispy-forms==1.6.1 # Models -django-model-utils==2.6 +django-model-utils==2.6.1 # Images Pillow==4.0.0 From 12a8875dce4d7848eed116eee2b3b8b44e720e79 Mon Sep 17 00:00:00 2001 From: statwonk Date: Mon, 16 Jan 2017 21:18:07 -0600 Subject: [PATCH 167/280] Two Scoops 1.8 on p. 56 indicates base.txt is preferred for consistency --- .../config/settings/{common.py => base.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {{cookiecutter.project_slug}}/config/settings/{common.py => base.py} (100%) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/base.py similarity index 100% rename from {{cookiecutter.project_slug}}/config/settings/common.py rename to {{cookiecutter.project_slug}}/config/settings/base.py From 62d86877e40f3ca9ff03d7423635634c23570ced Mon Sep 17 00:00:00 2001 From: statwonk Date: Mon, 16 Jan 2017 21:38:52 -0600 Subject: [PATCH 168/280] Missed a few references to the renamed settings file. This brings them inline. --- {{cookiecutter.project_slug}}/config/settings/local.py | 2 +- {{cookiecutter.project_slug}}/config/settings/production.py | 2 +- {{cookiecutter.project_slug}}/config/settings/test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index c72d3af11..969694bc9 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -14,7 +14,7 @@ Local settings import socket import os -from .common import * # noqa +from .base import * # noqa # DEBUG # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index c1fccc95b..94f781916 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -20,7 +20,7 @@ from django.utils import six import logging {% endif %} -from .common import * # noqa +from .base import * # noqa # SECRET CONFIGURATION # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/config/settings/test.py b/{{cookiecutter.project_slug}}/config/settings/test.py index 6d07eb50c..b1a43cd64 100644 --- a/{{cookiecutter.project_slug}}/config/settings/test.py +++ b/{{cookiecutter.project_slug}}/config/settings/test.py @@ -5,7 +5,7 @@ Test settings - Used to run tests fast on the continuous integration server and locally ''' -from .common import * # noqa +from .base import * # noqa # DEBUG From 5af837d184bcfa0af9ee83364fea8e43c7079e20 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 17 Jan 2017 16:12:11 +0100 Subject: [PATCH 169/280] Update django-coverage-plugin to 1.4 (#993) * Update django-coverage-plugin from 1.3.1 to 1.4 * Update django-coverage-plugin from 1.3.1 to 1.4 --- requirements_to_watch.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_to_watch.txt b/requirements_to_watch.txt index 34f0fe621..dc5193a65 100644 --- a/requirements_to_watch.txt +++ b/requirements_to_watch.txt @@ -1,4 +1,4 @@ # These requirements prevented an upgrade to Django 1.10. -django-coverage-plugin==1.3.1 +django-coverage-plugin==1.4 django-autoslug==1.9.3 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 42e0a5938..01a5f3f44 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,7 @@ # Local development dependencies go here -r base.txt coverage==4.3.1 -django-coverage-plugin==1.3.1 +django-coverage-plugin==1.4 Sphinx==1.5.1 django-extensions==1.7.5 Werkzeug==0.11.15 From 191fcf847a9cfdbc87c99c45be219c4342ac64fd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 17 Jan 2017 16:13:04 +0100 Subject: [PATCH 170/280] Update coverage to 4.3.3 (#997) * Update coverage from 4.3.1 to 4.3.3 * Update coverage from 4.3.1 to 4.3.3 --- {{cookiecutter.project_slug}}/requirements/local.txt | 4 +++- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 01a5f3f44..5ea7e0333 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,9 @@ # Local development dependencies go here -r base.txt -coverage==4.3.1 + +coverage==4.3.3 django-coverage-plugin==1.4 + Sphinx==1.5.1 django-extensions==1.7.5 Werkzeug==0.11.15 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index f5090f050..da665b341 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -7,7 +7,7 @@ psycopg2==2.6.2 {%- endif %} -coverage==4.3.1 +coverage==4.3.3 flake8==3.2.1 # pyup: != 2.6.0 django-test-plus==1.0.16 factory-boy==2.8.1 From de4c8c4012757aa544b68cae4904c0383b418bd9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 19 Jan 2017 10:01:29 +0100 Subject: [PATCH 171/280] Update coverage to 4.3.4 (#999) * Update coverage from 4.3.3 to 4.3.4 * Update coverage from 4.3.3 to 4.3.4 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 5ea7e0333..c541aeb57 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,7 @@ # Local development dependencies go here -r base.txt -coverage==4.3.3 +coverage==4.3.4 django-coverage-plugin==1.4 Sphinx==1.5.1 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index da665b341..cf409547b 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -7,7 +7,7 @@ psycopg2==2.6.2 {%- endif %} -coverage==4.3.3 +coverage==4.3.4 flake8==3.2.1 # pyup: != 2.6.0 django-test-plus==1.0.16 factory-boy==2.8.1 From 6cac408f32e828c0b5741085303c33c73ebf7372 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 26 Jan 2017 16:15:27 +0100 Subject: [PATCH 172/280] Update django-coverage-plugin to 1.4.1 (#1008) * Update django-coverage-plugin from 1.4 to 1.4.1 * Update django-coverage-plugin from 1.4 to 1.4.1 --- requirements_to_watch.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_to_watch.txt b/requirements_to_watch.txt index dc5193a65..aecc8e7cb 100644 --- a/requirements_to_watch.txt +++ b/requirements_to_watch.txt @@ -1,4 +1,4 @@ # These requirements prevented an upgrade to Django 1.10. -django-coverage-plugin==1.4 +django-coverage-plugin==1.4.1 django-autoslug==1.9.3 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index c541aeb57..26b2057a8 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.3.4 -django-coverage-plugin==1.4 +django-coverage-plugin==1.4.1 Sphinx==1.5.1 django-extensions==1.7.5 From 29e957cd77c3ab10919c68ac471edd5017bd4d20 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 26 Jan 2017 16:15:45 +0100 Subject: [PATCH 173/280] Update ipdb from 0.10.1 to 0.10.2 (#1007) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 26b2057a8..729dd14ae 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ factory-boy==2.8.1 django-debug-toolbar==1.6 # improved REPL -ipdb==0.10.1 +ipdb==0.10.2 pytest-django==3.1.2 pytest-sugar==0.8.0 From 6085feb36c4bb1d77a09cd87c30167b4a396a8f4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 26 Jan 2017 16:15:56 +0100 Subject: [PATCH 174/280] Update django-extensions from 1.7.5 to 1.7.6 (#1006) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 729dd14ae..4de7285c9 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -5,7 +5,7 @@ coverage==4.3.4 django-coverage-plugin==1.4.1 Sphinx==1.5.1 -django-extensions==1.7.5 +django-extensions==1.7.6 Werkzeug==0.11.15 django-test-plus==1.0.16 factory-boy==2.8.1 From 515e55c5ab645fdf7654cba118ae1ae57b254456 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 26 Jan 2017 16:16:08 +0100 Subject: [PATCH 175/280] Update pytest from 3.0.5 to 3.0.6 (#1003) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 87a6bf50c..188fe018f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.12.9 binaryornot==0.4.0 # Testing -pytest==3.0.5 +pytest==3.0.6 pep8==1.7.0 pyflakes==1.5.0 tox==2.5.0 From 01063b8b8b0efe67e92a79735cd85e71ad54e035 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Feb 2017 14:46:13 +0100 Subject: [PATCH 176/280] Update sphinx from 1.5.1 to 1.5.2 (#1010) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 4de7285c9..2757acddd 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -4,7 +4,7 @@ coverage==4.3.4 django-coverage-plugin==1.4.1 -Sphinx==1.5.1 +Sphinx==1.5.2 django-extensions==1.7.6 Werkzeug==0.11.15 django-test-plus==1.0.16 From cd5a742d50e388dc93cea28710be019fb6e20f4a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Feb 2017 14:46:25 +0100 Subject: [PATCH 177/280] Update whitenoise from 3.2.3 to 3.3.0 (#1011) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index c32a03241..c414136f3 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ django==1.10.5 # Configuration django-environ==0.4.1 {% if cookiecutter.use_whitenoise == 'y' -%} -whitenoise==3.2.3 +whitenoise==3.3.0 {%- endif %} From 572df4f359fafb1ad6431fe316355e273aba42a5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Feb 2017 14:46:50 +0100 Subject: [PATCH 178/280] Update django-test-plus to 1.0.17 (#1012) * Update django-test-plus from 1.0.16 to 1.0.17 * Update django-test-plus from 1.0.16 to 1.0.17 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 2757acddd..855a1f4b5 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -7,7 +7,7 @@ django-coverage-plugin==1.4.1 Sphinx==1.5.2 django-extensions==1.7.6 Werkzeug==0.11.15 -django-test-plus==1.0.16 +django-test-plus==1.0.17 factory-boy==2.8.1 django-debug-toolbar==1.6 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index cf409547b..5c46d1282 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -9,7 +9,7 @@ psycopg2==2.6.2 coverage==4.3.4 flake8==3.2.1 # pyup: != 2.6.0 -django-test-plus==1.0.16 +django-test-plus==1.0.17 factory-boy==2.8.1 # pytest From ec3daa58e4c0a216b0a1ce6ea2395c7f76d6d03e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Feb 2017 14:47:02 +0100 Subject: [PATCH 179/280] Update django-braces from 1.10.0 to 1.11.0 (#1013) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index c414136f3..0ce3b3ebf 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -17,7 +17,7 @@ whitenoise==3.3.0 # Forms -django-braces==1.10.0 +django-braces==1.11.0 django-crispy-forms==1.6.1 # Models From 9be889a9016c7889de1991a8ce949347e5bcccc7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Feb 2017 14:47:15 +0100 Subject: [PATCH 180/280] Update django-anymail from 0.7 to 0.8 (#1014) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 8714ec4a3..9827cee5d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,7 +24,7 @@ Collectfast==0.5.1 # Email backends for Mailgun, Postmark, SendGrid and more # ------------------------------------------------------- -django-anymail==0.7 +django-anymail==0.8 {% if cookiecutter.use_sentry_for_error_reporting == "y" -%} # Raven is the Sentry client From ce27703731e702b275d87af41f3ad41fb5dab2bf Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 2 Feb 2017 14:47:27 +0100 Subject: [PATCH 181/280] Update django-compressor from 2.1 to 2.1.1 (#1015) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 0ce3b3ebf..49e5ed18d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -54,7 +54,7 @@ celery==3.1.24 {% if cookiecutter.use_compressor == "y" %} rcssmin==1.0.6 {% if cookiecutter.windows == 'y' %}--install-option="--without-c-extensions"{% endif %} -django-compressor==2.1 +django-compressor==2.1.1 {% endif %} # Your custom requirements go here From 83900ddfd39818411868ec9d2469ae0151c73baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20C=2E=20Barrionuevo=20da=20Luz?= Date: Fri, 3 Feb 2017 14:12:52 -0300 Subject: [PATCH 182/280] fix typo --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index 5afa7d993..60ca7e6d3 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -24,7 +24,7 @@ env = environ.Env() READ_DOT_ENV_FILE = env('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: - # Operating System Environment variables have precende over variables defined in the .env file, + # Operating System Environment variables have precedence over variables defined in the .env file, # that is to say variables from the .env files will only be used if not defined # as environment variables. env_file = str(ROOT_DIR.path('.env')) From a2fe9199a6e35994912cdc3006abe9d744427433 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Wed, 8 Feb 2017 09:02:24 -0800 Subject: [PATCH 183/280] Added bullet about security --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index b27ab9da5..18fb36128 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,7 @@ Features * Renders Django projects with 100% starting test coverage * Twitter Bootstrap_ v4.0.0 - `alpha 4`_ (`maintained Foundation fork`_ also available) * 12-Factor_ based settings via django-environ_ +* Secure by default. We believe in SSL. * Optimized development and production settings * Registration via django-allauth_ * Comes with custom user model ready to go From 19a4de576a378052affb83ca6a8f1866c0d0ad4e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 9 Feb 2017 09:08:43 +0100 Subject: [PATCH 184/280] Update tox from 2.5.0 to 2.6.0 (#1017) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 188fe018f..2610ea317 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ binaryornot==0.4.0 pytest==3.0.6 pep8==1.7.0 pyflakes==1.5.0 -tox==2.5.0 +tox==2.6.0 pytest-cookies==0.2.0 From 7a50dcc89af09260501fbdb785f284495de81ca4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 9 Feb 2017 09:08:55 +0100 Subject: [PATCH 185/280] Update collectfast from 0.5.1 to 0.5.2 (#1024) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 9827cee5d..38ddb2220 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -19,7 +19,7 @@ gunicorn==19.6.0 boto==2.45.0 django-storages-redux==1.3.2 {% if cookiecutter.use_whitenoise != 'y' -%} -Collectfast==0.5.1 +Collectfast==0.5.2 {%- endif %} # Email backends for Mailgun, Postmark, SendGrid and more From 9bc7027fb0830ed62cea59f150e600e3359f8e44 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 9 Feb 2017 09:09:19 +0100 Subject: [PATCH 186/280] Update cookiecutter from 1.5.0 to 1.5.1 (#1018) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2610ea317..0e5486874 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==1.5.0 +cookiecutter==1.5.1 flake8==3.2.1 # pyup: != 2.6.0 sh==1.12.9 binaryornot==0.4.0 From b430efa0edc6739ef845adb94888cabd6ed0cf5c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 9 Feb 2017 09:10:22 +0100 Subject: [PATCH 187/280] Update flake8 to 3.3.0 (#1021) * Update flake8 from 3.2.1 to 3.3.0 * Update flake8 from 3.2.1 to 3.3.0 --- {{cookiecutter.project_slug}}/requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index 5c46d1282..afb97ded8 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -8,7 +8,7 @@ psycopg2==2.6.2 {%- endif %} coverage==4.3.4 -flake8==3.2.1 # pyup: != 2.6.0 +flake8==3.3.0 # pyup: != 2.6.0 django-test-plus==1.0.17 factory-boy==2.8.1 From 51609953a87f88d109a075240d67845dbdfb3b0b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 9 Feb 2017 09:10:37 +0100 Subject: [PATCH 188/280] Update django-coverage-plugin to 1.4.2 (#1022) * Update django-coverage-plugin from 1.4.1 to 1.4.2 * Update django-coverage-plugin from 1.4.1 to 1.4.2 --- requirements_to_watch.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_to_watch.txt b/requirements_to_watch.txt index aecc8e7cb..3e154af20 100644 --- a/requirements_to_watch.txt +++ b/requirements_to_watch.txt @@ -1,4 +1,4 @@ # These requirements prevented an upgrade to Django 1.10. -django-coverage-plugin==1.4.1 +django-coverage-plugin==1.4.2 django-autoslug==1.9.3 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 855a1f4b5..03cf457ba 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,7 +2,7 @@ -r base.txt coverage==4.3.4 -django-coverage-plugin==1.4.1 +django-coverage-plugin==1.4.2 Sphinx==1.5.2 django-extensions==1.7.6 From 5b75a9ccf2a1269db7915e1c0dbf5156d13adbed Mon Sep 17 00:00:00 2001 From: Matt Braymer-Hayes Date: Fri, 10 Feb 2017 00:21:04 -0800 Subject: [PATCH 189/280] 1029: Fix typo in Docker deployment docs (#1030) * #1029 Replace "wan't" with "want" * #1029 Add self to CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ docs/deployment-with-docker.rst | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 414d2a33b..7163cec14 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -107,6 +107,7 @@ Listed in alphabetical order. Lyla Fischer Martin Blech Mathijs Hoogland `@MathijsHoogland`_ + Matt Braymer-Hayes `@mattayes`_ @mattayes Matt Linares Matt Menzenski `@menzenski`_ Matt Warren `@mfwarren`_ @@ -193,6 +194,7 @@ Listed in alphabetical order. .. _@knitatoms: https://github.com/knitatoms .. _@krzysztofzuraw: https://github.com/krzysztofzuraw .. _@MathijsHoogland: https://github.com/MathijsHoogland +.. _@mattayes: https://github.com/mattayes .. _@menzenski: https://github.com/menzenski .. _@mfwarren: https://github.com/mfwarren .. _@mimischi: https://github.com/mimischi diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index 03aefd486..ac266993c 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -143,7 +143,7 @@ If you have errors, you can always check your stack with `docker-compose`. Switc Supervisor Example ------------------- -Once you are ready with your initial setup, you wan't to make sure that your application is run by a process manager to +Once you are ready with your initial setup, you want to make sure that your application is run by a process manager to survive reboots and auto restarts in case of an error. You can use the process manager you are most familiar with. All it needs to do is to run `docker-compose up` in your projects root directory. From d4f6f0b99c41fb06cfc3d41b49396e449bea7eae Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Fri, 10 Feb 2017 14:33:29 +0300 Subject: [PATCH 190/280] Fix Docker test PyCharm Run Configurations settings file Switch from env name="DJANGO_SETTINGS_MODULE" value="config.settings.local" to env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" --- .../.idea/runConfigurations/Docker__tests___all.xml | 2 +- .../.idea/runConfigurations/Docker__tests___class__TestUser.xml | 2 +- .../runConfigurations/Docker__tests___file__test_models.xml | 2 +- .../.idea/runConfigurations/Docker__tests___module__users.xml | 2 +- .../Docker__tests___specific__test_get_absolute_url.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__tests___all.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__tests___all.xml index 7ede8bfb5..02fba0797 100644 --- a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__tests___all.xml +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__tests___all.xml @@ -4,7 +4,7 @@