Merge commit 'a40121afd6110f1173e9237bfdbeec83ce2ebe88'

This commit is contained in:
Trung Dong Huynh 2018-01-22 14:43:43 +00:00
commit b02e386850
24 changed files with 47 additions and 38 deletions

View File

@ -7,11 +7,10 @@ services:
language: python language: python
python: 3.5 python: 3.6
env: env:
- TOX_ENV=py34 - TOX_ENV=py36
- TOX_ENV=py35
before_install: before_install:
- sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list' - sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list'

View File

@ -2,11 +2,15 @@
All enhancements and patches to Cookiecutter Django will be documented in this file. All enhancements and patches to Cookiecutter Django will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
## [2015-10-08] ## [2017-12-28]
### Changed
- Upgraded to Django 1.11 (@pydanny)
## [2017-10-08]
### Changed ### Changed
- Elastic Beanstalk: Added --noinput to migrate command (@MightySCollins ) - Elastic Beanstalk: Added --noinput to migrate command (@MightySCollins )
## [2015-10-07] ## [2017-10-07]
### Added ### Added
- Finished first pass at Elastic Beanstalk docs (@pydanny & @audreyr) - Finished first pass at Elastic Beanstalk docs (@pydanny & @audreyr)
### Deleted ### Deleted

View File

@ -127,6 +127,7 @@ Listed in alphabetical order.
Pablo `@oubiga`_ Pablo `@oubiga`_
Parbhat Puri `@parbhat`_ Parbhat Puri `@parbhat`_
Peter Bittner `@bittner`_ Peter Bittner `@bittner`_
Pierre Chiquet `@pchiquet`_
Raphael Pierzina `@hackebrot`_ Raphael Pierzina `@hackebrot`_
Raony Guimarães Corrêa `@raonyguimaraes`_ Raony Guimarães Corrêa `@raonyguimaraes`_
Reggie Riser `@reggieriser`_ Reggie Riser `@reggieriser`_

View File

@ -34,8 +34,8 @@ production-ready Django projects quickly.
Features Features
--------- ---------
* For Django 1.10 * For Django 1.11
* Works with Python 3.4.x or 3.5.x. Python 3.6 is experimental * Works with Python 3.6
* Renders Django projects with 100% starting test coverage * Renders Django projects with 100% starting test coverage
* Twitter Bootstrap_ v4.0.0 - beta 1 (`maintained Foundation fork`_ also available) * Twitter Bootstrap_ v4.0.0 - beta 1 (`maintained Foundation fork`_ also available)
* 12-Factor_ based settings via django-environ_ * 12-Factor_ based settings via django-environ_

View File

@ -18,7 +18,7 @@
"use_heroku": "n", "use_heroku": "n",
"use_elasticbeanstalk_experimental": "n", "use_elasticbeanstalk_experimental": "n",
"use_compressor": "n", "use_compressor": "n",
"postgresql_version": ["9.6", "9.5", "9.4", "9.3", "9.2"], "postgresql_version": ["10", "9.6", "9.5", "9.4", "9.3", "9.2"],
"js_task_runner": ["Gulp", "Grunt", "None"], "js_task_runner": ["Gulp", "Grunt", "None"],
"custom_bootstrap_compilation": "n", "custom_bootstrap_compilation": "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"]

View File

@ -21,6 +21,9 @@ 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 MY_PROJECT_SLUG
# Warning: If you use python3.6, you will run into problems later due to some incompatibility with
# mod_wgsi 3.5 (packaged in 64bit Amazon Linux 2017.09 v2.6.1 running Python 3.6). See:
# https://serverfault.com/questions/884469/mod-wsgi-call-to-site-addsitedir-failed-on-aws-elastic-beanstalk-python-3/885445
Replace `MY_PROJECT_SLUG` with the value you entered for `project_slug`. Replace `MY_PROJECT_SLUG` with the value you entered for `project_slug`.

View File

@ -4,7 +4,7 @@ sh==1.12.14
binaryornot==0.4.4 binaryornot==0.4.4
# Testing # Testing
pytest==3.2.5 pytest==3.3.2
pycodestyle==2.3.1 pycodestyle==2.3.1
pyflakes==1.6.0 pyflakes==1.6.0
tox==2.9.1 tox==2.9.1

View File

@ -10,7 +10,7 @@ except ImportError:
# Our version ALWAYS matches the version of Django we support # 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. # If Django has a new release, we branch, tag, then update this setting after the tag.
version = '1.10.7' version = '1.11.8'
if sys.argv[-1] == 'tag': if sys.argv[-1] == 'tag':
os.system('git tag -a %s -m "version %s"' % (version, version)) os.system('git tag -a %s -m "version %s"' % (version, version))

View File

@ -1,6 +1,6 @@
[tox] [tox]
skipsdist = true skipsdist = true
envlist = py34,py35 envlist = py36
[testenv] [testenv]
passenv = LC_ALL, LANG, HOME passenv = LC_ALL, LANG, HOME

View File

@ -3,3 +3,5 @@ packages:
git: [] git: []
postgresql94-devel: [] postgresql94-devel: []
libjpeg-turbo-devel: [] libjpeg-turbo-devel: []
libffi: []
libffi-devel: []

View File

@ -10,7 +10,7 @@ option_settings:
REDIS_ENDPOINT_ADDRESS: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Address"]}`' REDIS_ENDPOINT_ADDRESS: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Address"]}`'
REDIS_PORT: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Port"]}`' REDIS_PORT: '`{ "Fn::GetAtt" : [ "MyElastiCache", "RedisEndpoint.Port"]}`'
"aws:elasticbeanstalk:container:python": "aws:elasticbeanstalk:container:python":
WSGIPath: "config/wsgi.py" WSGIPath: config/wsgi.py
NumProcesses: 3 NumProcesses: 3
NumThreads: 20 NumThreads: 20
"aws:elasticbeanstalk:container:python:staticfiles": "aws:elasticbeanstalk:container:python:staticfiles":

View File

@ -6,7 +6,7 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.local" /> <env name="DJANGO_SETTINGS_MODULE" value="config.settings.local" />
</envs> </envs>
<option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:pycharm/python" /> <option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:django/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" /> <option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />

View File

@ -6,7 +6,7 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" /> <env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" />
</envs> </envs>
<option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:pycharm/python" /> <option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:django/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />

View File

@ -6,7 +6,7 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" /> <env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" />
</envs> </envs>
<option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:pycharm/python" /> <option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:django/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />

View File

@ -6,7 +6,7 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" /> <env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" />
</envs> </envs>
<option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:pycharm/python" /> <option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:django/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />

View File

@ -6,7 +6,7 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" /> <env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" />
</envs> </envs>
<option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:pycharm/python" /> <option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:django/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />

View File

@ -6,7 +6,7 @@
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" /> <env name="DJANGO_SETTINGS_MODULE" value="config.settings.test" />
</envs> </envs>
<option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:pycharm/python" /> <option name="SDK_HOME" value="docker-compose://[$PROJECT_DIR$/local.yml]:django/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />

View File

@ -79,8 +79,6 @@ Email Server
{% if cookiecutter.use_docker == 'y' %} {% if cookiecutter.use_docker == 'y' %}
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container. In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container.
.. _mailhog: https://github.com/mailhog/MailHog
Container mailhog will start automatically when you will run all docker containers. Container mailhog will start automatically when you will run all docker containers.
Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers. Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers.
@ -88,8 +86,6 @@ With MailHog running, to view messages that are sent by your application, open y
{% else %} {% else %}
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available. In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available.
.. _mailhog: https://github.com/mailhog/MailHog
To start the service, make sure you have nodejs installed, and then type the following:: To start the service, make sure you have nodejs installed, and then type the following::
$ npm install $ npm install
@ -101,6 +97,7 @@ To view messages that are sent by your application, open your browser and go to
The email server will exit when you exit the Grunt task on the CLI with Ctrl+C. The email server will exit when you exit the Grunt task on the CLI with Ctrl+C.
{% endif %} {% endif %}
.. _mailhog: https://github.com/mailhog/MailHog
{% endif %} {% endif %}
{% if cookiecutter.use_sentry_for_error_reporting == "y" %} {% if cookiecutter.use_sentry_for_error_reporting == "y" %}
@ -142,7 +139,7 @@ Elastic Beanstalk
See detailed `cookiecutter-django Elastic Beanstalk documentation`_. See detailed `cookiecutter-django Elastic Beanstalk documentation`_.
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html .. _`cookiecutter-django Elastic Beanstalk documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html
{% endif %} {% endif %}
{% if cookiecutter.custom_bootstrap_compilation == "y" %} {% if cookiecutter.custom_bootstrap_compilation == "y" %}

View File

@ -120,7 +120,7 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
# See:http://stackoverflow.com/questions/10390244/ # See:http://stackoverflow.com/questions/10390244/
from storages.backends.s3boto3 import S3Boto3Storage from storages.backends.s3boto3 import S3Boto3Storage
StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa
MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media') # noqa MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media', file_overwrite=False) # noqa
DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage' DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage'
MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME

View File

@ -1,2 +1,5 @@
[pytest] [pytest]
DJANGO_SETTINGS_MODULE=config.settings.test DJANGO_SETTINGS_MODULE=config.settings.test
{% if cookiecutter.js_task_runner != 'None' %}
norecursedirs = node_modules
{% endif %}

View File

@ -5,8 +5,8 @@
wheel==0.30.0 wheel==0.30.0
# Bleeding edge Django # Conservative Django
django==1.10.8 # pyup: >=1.10,<1.11 django==1.11.9 # pyup: <2.0
# Configuration # Configuration
django-environ==0.4.4 django-environ==0.4.4
@ -19,13 +19,13 @@ whitenoise==3.3.1
django-crispy-forms==1.7.0 django-crispy-forms==1.7.0
# Models # Models
django-model-utils==3.0.0 django-model-utils==3.1.1
# Images # Images
Pillow==4.3.0 Pillow==5.0.0
# Password storage # Password storage
argon2-cffi==16.3.0 argon2-cffi==18.1.0
# For user registration, either via email or social # For user registration, either via email or social
# Well-built with regular release cycles! # Well-built with regular release cycles!

View File

@ -4,10 +4,10 @@
coverage==4.4.2 coverage==4.4.2
django-coverage-plugin==1.5.0 django-coverage-plugin==1.5.0
Sphinx==1.6.5 Sphinx==1.6.6
django-extensions==1.9.7 django-extensions==1.9.8
Werkzeug==0.12.2 Werkzeug==0.14.1
django-test-plus==1.0.20 django-test-plus==1.0.22
factory-boy==2.9.2 factory-boy==2.9.2
django-debug-toolbar==1.9.1 django-debug-toolbar==1.9.1

View File

@ -16,10 +16,10 @@ gunicorn==19.7.1
# Static and Media Storage # Static and Media Storage
# ------------------------------------------------ # ------------------------------------------------
boto3==1.4.7 boto3==1.5.12
django-storages==1.6.5 django-storages==1.6.5
{% if cookiecutter.use_whitenoise != 'y' -%} {% if cookiecutter.use_whitenoise != 'y' -%}
Collectfast==0.5.2 Collectfast==0.6.0
{%- endif %} {%- endif %}
# Email backends for Mailgun, Postmark, SendGrid and more # Email backends for Mailgun, Postmark, SendGrid and more
@ -29,11 +29,11 @@ django-anymail==1.2
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%} {% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
# Raven is the Sentry client # Raven is the Sentry client
# -------------------------- # --------------------------
raven==6.3.0 raven==6.4.0
{%- endif %} {%- endif %}
{% if cookiecutter.use_opbeat == "y" -%} {% if cookiecutter.use_opbeat == "y" -%}
# Opbeat agent for performance monitoring # Opbeat agent for performance monitoring
# ----------------------------------------- # -----------------------------------------
opbeat==3.5.3 opbeat==3.6.0
{%- endif %} {%- endif %}

View File

@ -9,7 +9,7 @@ psycopg2==2.7.3.2
coverage==4.4.2 coverage==4.4.2
flake8==3.5.0 # pyup: != 2.6.0 flake8==3.5.0 # pyup: != 2.6.0
django-test-plus==1.0.20 django-test-plus==1.0.22
factory-boy==2.9.2 factory-boy==2.9.2
django-coverage-plugin==1.5.0 django-coverage-plugin==1.5.0