Merge master

This commit is contained in:
Nikita P. Shupeyko 2017-11-20 13:25:29 +03:00
commit a16c58aca7
24 changed files with 67 additions and 98 deletions

View File

@ -68,6 +68,7 @@ Listed in alphabetical order.
Burhan Khalid            `@burhan`_                   @burhan
Catherine Devlin `@catherinedevlin`_
Cédric Gaspoz `@cgaspoz`_
Charlie Smith `@chuckus`_
Chris Curvey `@ccurvey`_
Chris Franklin
Chris Franklin `@hairychris`_
@ -128,6 +129,7 @@ Listed in alphabetical order.
Peter Bittner `@bittner`_
Raphael Pierzina `@hackebrot`_
Raony Guimarães Corrêa `@raonyguimaraes`_
Reggie Riser `@reggieriser`_
René Muhl `@rm--`_
Roman Afanaskin `@siauPatrick`_
Roman Osipenko `@romanosipenko`_
@ -178,6 +180,7 @@ Listed in alphabetical order.
.. _@cgaspoz: https://github.com/cgaspoz
.. _@chrisdev: https://github.com/chrisdev
.. _@ChrisPappalardo: https://github.com/ChrisPappalardo
.. _@chuckus: https://github.com/chuckus
.. _@Collederas: https://github.com/Collederas
.. _@ddiazpinto: https://github.com/ddiazpinto
.. _@dezoito: https://github.com/dezoito
@ -220,6 +223,7 @@ Listed in alphabetical order.
.. _@oubiga: https://github.com/oubiga
.. _@parbhat: https://github.com/parbhat
.. _@raonyguimaraes: https://github.com/raonyguimaraes
.. _@reggieriser: https://github.com/reggieriser
.. _@rm--: https://github.com/rm--
.. _@romanosipenko: https://github.com/romanosipenko
.. _@shireenrao: https://github.com/shireenrao

View File

@ -12,13 +12,16 @@ Cookiecutter Django
.. image:: https://badges.gitter.im/Join Chat.svg
:target: https://gitter.im/pydanny/cookiecutter-django?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting
production-ready Django projects quickly.
* 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_ don't send emails to the maintainers.
* Need quick professional paid support? Contact `support@cookiecutter.io`_. This includes configuring your servers,
fixing bugs, reviewing your code and everything in between.
* If you have problems with Cookiecutter Django, please open issues_ don't send
emails to the maintainers.
* Need quick professional paid support? Contact `support@cookiecutter.io`_.
This includes configuring your servers, fixing bugs, reviewing your code and
everything in between.
.. _cookiecutter: https://github.com/audreyr/cookiecutter
@ -34,7 +37,7 @@ Features
* For Django 1.10
* Works with Python 3.4.x or 3.5.x. Python 3.6 is experimental
* Renders Django projects with 100% starting test coverage
* Twitter Bootstrap_ v4.0.0 - alpha 6 (`maintained Foundation fork`_ also available)
* Twitter Bootstrap_ v4.0.0 - beta 1 (`maintained Foundation fork`_ also available)
* 12-Factor_ based settings via django-environ_
* Secure by default. We believe in SSL.
* Optimized development and production settings
@ -107,7 +110,7 @@ Two Scoops of Django 1.11
:alt: Two Scoops of Django
:target: http://twoscoopspress.org/products/two-scoops-of-django-1-11
Two Scoops of Django is the best dairy-themed Django reference in the universe
Two Scoops of Django is the best dessert-themed Django reference in the universe
pyup
~~~~~~~~~~~~~~~~~~

View File

@ -30,14 +30,14 @@ The config for pylint is located in .pylintrc. It specifies:
* Disable linting messages for missing docstring and invalid name
* max-parents=13
pep8
pycodestyle
-----
This is included in flake8's checks, but you can also run it separately to see a more detailed report:
$ pep8 <python files that you wish to lint>
$ pycodestyle <python files that you wish to lint>
The config for pep8 is located in setup.cfg. It specifies:
The config for pycodestyle is located in setup.cfg. It specifies:
* Set max line length to 120 chars
* Exclude ``.tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules``

View File

@ -1,11 +1,11 @@
cookiecutter==1.5.1
flake8==3.4.1 # pyup: != 2.6.0
cookiecutter==1.6.0
flake8==3.5.0 # pyup: != 2.6.0
sh==1.12.14
binaryornot==0.4.4
# Testing
pytest==3.2.2
pep8==1.7.0
pytest==3.2.5
pycodestyle==2.3.1
pyflakes==1.6.0
tox==2.8.2
pytest-cookies==0.2.0
tox==2.9.1
pytest-cookies==0.3.0

View File

@ -1,3 +1,4 @@
CONN_MAX_AGE=
# DJANGO_READ_DOT_ENV_FILE=True
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=!!!SET DJANGO_SECRET_KEY!!!

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
"""
Django settings for {{cookiecutter.project_name}} project.
Base settings for {{cookiecutter.project_name}} project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
@ -108,6 +108,8 @@ MANAGERS = ADMINS
# DATABASE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
# Uses django-environ to accept uri format
# See: https://django-environ.readthedocs.io/en/latest/#supported-types
DATABASES = {
'default': env.db('DATABASE_URL', default='postgres://{% if cookiecutter.windows == 'y' %}localhost{% endif %}/{{cookiecutter.project_slug}}'),
}

View File

@ -1,9 +1,9 @@
"""
Local settings
Local settings for {{cookiecutter.project_name}} project.
- Run in Debug mode
{% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'y' %}
- Use mailhog for emails
- Use mailhog for emails via Docker
{% elif cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %}
- Use mailhog for emails
{% else %}

View File

@ -1,5 +1,5 @@
"""
Production Configurations
Production settings for {{cookiecutter.project_name}} project.
{% if cookiecutter.use_whitenoise == 'y' -%}
- Use WhiteNoise for serving static files{% endif %}
@ -119,8 +119,8 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
{% else %}
# See:http://stackoverflow.com/questions/10390244/
from storages.backends.s3boto3 import S3Boto3Storage
StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static')
MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media')
StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa
MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media') # noqa
DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage'
MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME
@ -159,7 +159,7 @@ ANYMAIL = {
'MAILGUN_API_KEY': env('DJANGO_MAILGUN_API_KEY'),
'MAILGUN_SENDER_DOMAIN': env('MAILGUN_SENDER_DOMAIN')
}
EMAIL_BACKEND = 'anymail.backends.mailgun.MailgunBackend'
EMAIL_BACKEND = 'anymail.backends.mailgun.EmailBackend'
# TEMPLATE CONFIGURATION
# ------------------------------------------------------------------------------
@ -169,7 +169,7 @@ TEMPLATES[0]['OPTIONS']['loaders'] = [
('django.template.loaders.cached.Loader', [
'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ]),
]
{% set _DEFAULT_CONN_MAX_AGE=60 %}
# DATABASE CONFIGURATION
# ------------------------------------------------------------------------------
{% if cookiecutter.use_elasticbeanstalk_experimental.lower() == 'y' -%}
@ -182,12 +182,14 @@ DATABASES = {
'PASSWORD': env('RDS_PASSWORD'),
'HOST': env('RDS_HOSTNAME'),
'PORT': env('RDS_PORT'),
'CONN_MAX_AGE': env.int('CONN_MAX_AGE', default={{ _DEFAULT_CONN_MAX_AGE }}),
}
}
{% else %}
# Use the Heroku-style specification
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
DATABASES['default'] = env.db('DATABASE_URL')
DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', default={{ _DEFAULT_CONN_MAX_AGE }})
{%- endif %}
# CACHING

View File

@ -1,8 +1,8 @@
'''
Test settings
"""
Test settings for {{cookiecutter.project_name}} project.
- Used to run tests fast on the continuous integration server and locally
'''
"""
from .base import * # noqa

View File

@ -11,39 +11,39 @@ django==1.10.8 # pyup: >=1.10,<1.11
# Configuration
django-environ==0.4.4
{% if cookiecutter.use_whitenoise == 'y' -%}
whitenoise==3.3.0
whitenoise==3.3.1
{%- endif %}
# Forms
django-crispy-forms==1.6.1
django-crispy-forms==1.7.0
# Models
django-model-utils==3.0.0
# Images
Pillow==4.2.1
Pillow==4.3.0
# Password storage
argon2-cffi==16.3.0
# For user registration, either via email or social
# Well-built with regular release cycles!
django-allauth==0.33.0
django-allauth==0.34.0
{% if cookiecutter.windows == 'y' -%}
# On Windows, you must download/install psycopg2 manually
# from http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg
{% else %}
# Python-PostgreSQL Database Adapter
psycopg2==2.7.3.1
psycopg2==2.7.3.2
{%- endif %}
# Unicode slugification
awesome-slugify==1.6.5
# Time zones support
pytz==2017.2
pytz==2017.3
# Redis support
django-redis==4.8.0

View File

@ -1,16 +1,16 @@
# Local development dependencies go here
-r base.txt
coverage==4.4.1
coverage==4.4.2
django-coverage-plugin==1.5.0
Sphinx==1.6.3
django-extensions==1.9.1
Sphinx==1.6.5
django-extensions==1.9.7
Werkzeug==0.12.2
django-test-plus==1.0.18
django-test-plus==1.0.20
factory-boy==2.9.2
django-debug-toolbar==1.8
django-debug-toolbar==1.9.1
# improved REPL
ipdb==0.10.3

View File

@ -6,7 +6,7 @@
# Python-PostgreSQL Database Adapter
# Assuming Windows is used locally, and *nix -- in production.
# ------------------------------------------------------------
psycopg2==2.7.3.1
psycopg2==2.7.3.2
{%- endif %}
# WSGI Handler
@ -24,16 +24,16 @@ Collectfast==0.5.2
# Email backends for Mailgun, Postmark, SendGrid and more
# -------------------------------------------------------
django-anymail==0.11.1
django-anymail==1.2
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
# Raven is the Sentry client
# --------------------------
raven==6.1.0
raven==6.3.0
{%- endif %}
{% if cookiecutter.use_opbeat == "y" -%}
# Opbeat agent for performance monitoring
# -----------------------------------------
opbeat==3.5.2
opbeat==3.5.3
{%- endif %}

View File

@ -4,12 +4,12 @@
{% if cookiecutter.windows == 'y' -%}
# Python-PostgreSQL Database Adapter
# If using Win for dev, this assumes Unix in test/prod
psycopg2==2.7.3.1
psycopg2==2.7.3.2
{%- endif %}
coverage==4.4.1
flake8==3.4.1 # pyup: != 2.6.0
django-test-plus==1.0.18
coverage==4.4.2
flake8==3.5.0 # pyup: != 2.6.0
django-test-plus==1.0.20
factory-boy==2.9.2
django-coverage-plugin==1.5.0

View File

@ -12,23 +12,6 @@
border-color: #eed3d7;
}
/* This is a fix for the bootstrap4 alpha release */
@media (max-width: 47.9em) {
.navbar-nav .nav-item {
float: none;
width: 100%;
display: inline-block;
}
.navbar-nav .nav-item + .nav-item {
margin-left: 0;
}
.nav.navbar-nav.pull-xs-right {
float: none !important;
}
}
/* Display django-debug-toolbar.
See https://github.com/django-debug-toolbar/django-debug-toolbar/issues/742
and https://github.com/pydanny/cookiecutter-django/issues/317

View File

@ -87,32 +87,6 @@ $red: #b94a48;
color: $red;
}
////////////////////////////////
//Navbar//
////////////////////////////////
// This is a fix for the bootstrap4 alpha release
.navbar {
border-radius: 0px;
}
@media (max-width: 47.9em) {
.navbar-nav .nav-item {
display: inline-block;
float: none;
width: 100%;
}
.navbar-nav .nav-item + .nav-item {
margin-left: 0;
}
.nav.navbar-nav.pull-xs-right {
float: none !important;
}
}
////////////////////////////////
//Django Toolbar//
////////////////////////////////

View File

@ -14,7 +14,7 @@
<![endif]-->
{% block css %}
<!-- Latest compiled and minified Bootstrap 4 Alpha 4 CSS -->
<!-- Latest compiled and minified Bootstrap 4 beta CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<!-- Your stuff: Third-party CSS libraries go here -->
@ -88,7 +88,7 @@
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
{% block javascript %}
<!-- Required by Bootstrap v4 Alpha 4 -->
<!-- Required by Bootstrap v4 beta -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>