diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index f57280e5e..e46c5209a 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -146,6 +146,7 @@ Listed in alphabetical order. Travis McNeill `@Travistock`_ @tavistock_esq Vitaly Babiy Vivian Guillen `@viviangb`_ + Wan Liuyang `@sfdye`_ @sfdye Will Farley `@goldhand`_ @g01dhand William Archinal `@archinal`_ Yaroslav Halchenko @@ -223,6 +224,7 @@ Listed in alphabetical order. .. _@shireenrao: https://github.com/shireenrao .. _@webyneter: https://github.com/webyneter .. _@show0k: https://github.com/show0k +.. _@sfdye: https://github.com/sfdye .. _@shultz: https://github.com/shultz .. _@siauPatrick: https://github.com/siauPatrick .. _@slafs: https://github.com/slafs diff --git a/README.rst b/README.rst index 6ae645fa6..2b239f784 100644 --- a/README.rst +++ b/README.rst @@ -43,7 +43,7 @@ Features * Grunt build for compass and livereload * Send emails via Anymail_ (using Mailgun_ by default, but switchable) * Media storage using Amazon S3 -* Docker support using docker-compose_ for development and production (using _Caddy with LetsEncrypt support) +* Docker support using docker-compose_ for development and production (using Caddy_ with LetsEncrypt_ support) * Procfile_ for deploying to Heroku * Instructions for deploying to PythonAnywhere_ * Run tests with unittest or py.test @@ -80,6 +80,7 @@ Optional Integrations .. _Opbeat: https://opbeat.com/ .. _PythonAnywhere: https://www.pythonanywhere.com/ .. _Caddy: https://caddyserver.com/ +.. _LetsEncrypt: https://letsencrypt.org/ Constraints ----------- diff --git a/requirements.txt b/requirements.txt index b87473c17..b6f1a0af3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ binaryornot==0.4.4 pytest==3.2.1 pep8==1.7.0 pyflakes==1.6.0 -tox==2.7.0 +tox==2.8.0 pytest-cookies==0.2.0 diff --git a/{{cookiecutter.project_slug}}/compose/caddy/Caddyfile b/{{cookiecutter.project_slug}}/compose/caddy/Caddyfile index 22ec73f4d..d36632e4b 100644 --- a/{{cookiecutter.project_slug}}/compose/caddy/Caddyfile +++ b/{{cookiecutter.project_slug}}/compose/caddy/Caddyfile @@ -1,8 +1,8 @@ -www.{% raw %}{%DOMAIN_NAME%}{% endraw %} { +www.{% raw %}{$DOMAIN_NAME}{% endraw %} { redir https://{{cookiecutter.domain_name}} } -{% raw %}{%DOMAIN_NAME%}{% endraw %} { +{% raw %}{$DOMAIN_NAME}{% endraw %} { proxy / django:5000 { header_upstream Host {host} header_upstream X-Real-IP {remote} diff --git a/{{cookiecutter.project_slug}}/compose/django/Dockerfile-dev b/{{cookiecutter.project_slug}}/compose/django/Dockerfile-local similarity index 100% rename from {{cookiecutter.project_slug}}/compose/django/Dockerfile-dev rename to {{cookiecutter.project_slug}}/compose/django/Dockerfile-local diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 98949ca0c..bf031d351 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -3,7 +3,7 @@ Production Configurations {% if cookiecutter.use_whitenoise == 'y' -%} - Use WhiteNoise for serving static files{% endif %} -- Use Amazon's S3 for {% if cookiecutter.use_whitenoise == 'n' -%}storing static files {% endif %}and uploaded media +- Use Amazon's S3 for storing {% if cookiecutter.use_whitenoise == 'n' -%}static files and {% endif %}uploaded media - Use mailgun to send emails - Use Redis for cache {% if cookiecutter.use_sentry_for_error_reporting == 'y' %} diff --git a/{{cookiecutter.project_slug}}/docs/pycharm/configuration.rst b/{{cookiecutter.project_slug}}/docs/pycharm/configuration.rst index 551da194c..af3b826a7 100644 --- a/{{cookiecutter.project_slug}}/docs/pycharm/configuration.rst +++ b/{{cookiecutter.project_slug}}/docs/pycharm/configuration.rst @@ -25,14 +25,6 @@ Switch to *Docker Compose* and select `local.yml` file from directory of your pr .. image:: images/4.png -Because Pycharm restarts container every time you use Configuration Run, to not have server restarted during running tests, we defined second service in `local.yml` file called pycharm. To use it, you have to add interpreter of second service as well. - -.. image:: images/5.png - -The final result should be: - -.. image:: images/6.png - Having that, click *OK*. Close *Settings* panel, and wait few seconds... .. image:: images/7.png diff --git a/{{cookiecutter.project_slug}}/docs/pycharm/images/5.png b/{{cookiecutter.project_slug}}/docs/pycharm/images/5.png deleted file mode 100644 index 39fac9593..000000000 Binary files a/{{cookiecutter.project_slug}}/docs/pycharm/images/5.png and /dev/null differ diff --git a/{{cookiecutter.project_slug}}/docs/pycharm/images/6.png b/{{cookiecutter.project_slug}}/docs/pycharm/images/6.png deleted file mode 100644 index 0cd70d249..000000000 Binary files a/{{cookiecutter.project_slug}}/docs/pycharm/images/6.png and /dev/null differ diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index a2171e403..2bc28ee5f 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -8,7 +8,7 @@ services: django: &django build: context: . - dockerfile: ./compose/django/Dockerfile-dev + dockerfile: ./compose/django/Dockerfile-local depends_on: - postgres{% if cookiecutter.use_mailhog == 'y' %} - mailhog{% endif %} @@ -28,19 +28,6 @@ services: - postgres_backup_dev:/backups env_file: - ./.envs/.local/.postgres -{% if cookiecutter.use_pycharm == 'y' %} - pycharm: - build: - context: . - dockerfile: ./compose/django/Dockerfile-dev - depends_on: - - postgres - volumes: - - .:/app - env_file: - - ./.env/.local/.django - - ./.env/.local/.postgres -{% endif %} {% if cookiecutter.use_mailhog == 'y' %} mailhog: image: mailhog/mailhog:v1.0.0 diff --git a/{{cookiecutter.project_slug}}/pytest.ini b/{{cookiecutter.project_slug}}/pytest.ini index 5a6a1ca68..5b4369b89 100644 --- a/{{cookiecutter.project_slug}}/pytest.ini +++ b/{{cookiecutter.project_slug}}/pytest.ini @@ -1,3 +1,2 @@ [pytest] -addopts = --exitfirst DJANGO_SETTINGS_MODULE=config.settings.test diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index c3258623f..0e15afab5 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -16,7 +16,6 @@ whitenoise==3.3.0 # Forms -django-braces==1.11.0 django-crispy-forms==1.6.1 # Models @@ -37,7 +36,7 @@ django-allauth==0.33.0 # from http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg {% else %} # Python-PostgreSQL Database Adapter -psycopg2==2.7.3 +psycopg2==2.7.3.1 {%- endif %} # Unicode slugification diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 7abe06f3f..b9f09ca75 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -6,7 +6,7 @@ # Python-PostgreSQL Database Adapter # If using Win for dev, this assumes Unix in prod # ------------------------------------------------ -psycopg2==2.7.3 +psycopg2==2.7.3.1 {%- endif %} # WSGI Handler @@ -16,7 +16,7 @@ gunicorn==19.7.1 # Static and Media Storage # ------------------------------------------------ -boto3==1.4.6 +boto3==1.4.7 django-storages==1.6.5 {% if cookiecutter.use_whitenoise != 'y' -%} Collectfast==0.5.2 diff --git a/{{cookiecutter.project_slug}}/requirements/test.txt b/{{cookiecutter.project_slug}}/requirements/test.txt index f1d331ac9..c12222eb1 100644 --- a/{{cookiecutter.project_slug}}/requirements/test.txt +++ b/{{cookiecutter.project_slug}}/requirements/test.txt @@ -4,7 +4,7 @@ {% if cookiecutter.windows == 'y' -%} # Python-PostgreSQL Database Adapter # If using Win for dev, this assumes Unix in test/prod -psycopg2==2.7.3 +psycopg2==2.7.3.1 {%- endif %} coverage==4.4.1 diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index e947da5b8..960cd8604 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -1,4 +1,4 @@ -{% raw %}{% load staticfiles i18n {% endraw %}{% if cookiecutter.use_compressor == "y" %}compress{% endif %}{% raw %}%} +{% raw %}{% load static i18n {% endraw %}{% if cookiecutter.use_compressor == "y" %}compress{% endif %}{% raw %}%}