Commit Graph

82 Commits

Author SHA1 Message Date
Bruno Alla
82dcd2d30c Simplify Mailgun settings
When creating a Mailgun add-on on Heroku, the app gets some environment
variables by default:

    MAILGUN_API_KEY
    MAILGUN_DOMAIN

However, the cookiecutter names do not match and requires a manual step
from the user deploying. It's used elsewhere but shouldn't harm the
other deployment methods to rename these variables.

While updating the docs I noticed a variable that appear unused
DJANGO_MAILGUN_SERVER_NAME so this removes it from the documentation.
2018-03-05 17:56:45 +00:00
Nikita P. Shupeyko
64f2541743 Set ALLOWED_HOSTS in config.settings.local 2018-03-04 17:51:37 +03:00
Nikita P. Shupeyko
f4e217ed21 Simplify production databases section generation 2018-03-04 17:33:54 +03:00
Nikita P. Shupeyko
6c26d39f65 Unconditionally connect to database from DATABASE_URL env when opting for Docker
Closes #1541.
2018-03-04 17:24:06 +03:00
adammsteele
ed2204ecba Celery config - json serialization by default (#1535)
* Use json serialization in celery by default

* Added myself to CONTRIBUTORS.rst
2018-03-01 14:25:33 +03:00
Wan Liuyang
30dfbbd0ab Remove AWS S3 header bytes workaround 2018-02-20 16:04:16 +08:00
Bruno Alla
3853094221
Merge pull request #1374 from svleeuwen/patch-1
Remove boto related settings that aren't used
2018-02-16 21:19:35 +00:00
Hashim Muqtadir
e8ca2dd8ea Add atomic requests setting to production.py (#1513)
Since config/production.py sets a new value for `DATABASES['default']`, the `DATABASES['default']['ATOMIC_REQUESTS'] = True` setting from base gets overridden. So it's probably a good idea to add it back.
2018-02-16 18:15:50 +03:00
Sander van Leeuwen
bef1bb856e
Add cache control via AWS_S3_OBJECT_PARAMETERS setting
Previously covered by AWS_HEADERS
2018-02-13 16:04:43 +01:00
Nikita Shupeyko
86e33e8714
Refactor *_gen_project hooks (#1490)
* Fix ./hooks/pre_gen_project.py asking user to select an option once only

+ prettify output

* Fix pre_gen hook not really exiting when it should

* Refactor & prettify ./hooks/post_gen_project.py

* Ensure same POSTGRES_USER is set across environments

+ get rid of env.example in favor of pre-generated .env.
2018-02-07 22:52:52 +03:00
Daniel Roy Greenfeld
793a46ba45 Removed expiramental elastic beanstalk support and bumped official Django version to 1.11.9 2018-01-15 12:33:51 -08:00
Pierre Chiquet
d2dd265a99 Fix MediaRootS3BotoStorage: do not override existing files (#1367)
* Fix MediaRootS3BotoStorage: do not override existing files

see https://github.com/jschneier/django-storages/issues/50

* Update "other contributors"

* alphabetical order
2017-12-13 16:06:48 +03:00
Bruno Alla
4f8cd89bb7 Set CONN_MAX_AGE to 60 seconds -- fixes #710 (#1382)
* Set CONN_MAX_AGE to 60 seconds -- fixes #710

Setting the value in the production config.

* Get CONN_MAX_AGE from the environment, default to 60 in .env

* Add test for CONN_MAX_AGE setting

* Remove duplication in default value & test cleanup

* Remove test for CONN_MAX_AGE value in settings
2017-11-13 23:08:47 +03:00
Sander van Leeuwen
9661ecaf8f Remove boto related settings that aren't used
Since upgrade to boto3 in commit 12db5176d6 we don't need AWS_HEADERS anymore
2017-10-25 14:11:36 +02:00
Chris Franklin
d0e5c4b3b6 Fix comments and silence PEP8 lambda warnings in config module. (#1357) 2017-10-12 20:36:44 +03:00
Charlie Smith
cda6878486 More inline docs for DATABASES variable (#1350)
* More inline docs for DATABASES variable

Use of database url is not part of Django, but comes from django-environ. Was initially confusing where feature came from, as link points to offical django docs.

* Contributors update
2017-09-30 15:18:55 +03:00
Wan Liuyang
ea5fb0efb6 Update EMAIL_BACKEND to "anymail.backends.espname.EmailBackend" to match anymail 1.0 (#1335) 2017-09-18 16:19:09 +03:00
Reggie Riser
0e1c00d3b3 Fixed typo in generated comment. (#1306) 2017-08-28 22:30:56 +03:00
Bruno Alla
4be48b7999 Use django-storages for media files if using WhiteNoise - fixes #1192
As per the discussion in #869, WhiteNoise is for serving static files
not for media files (files uploaded from the app by users).
For such thing, we still need `DEFAULT_FILE_STORAGE` to be set and
we use django-storages for that.
2017-08-02 20:10:49 +01:00
Bruno Alla
12db5176d6 Upgrade to boto3 fixes #998
- Boto3 is the replacement of boto, switch to the latest version
- Switch django-storages class to the one based on Boto3
- AWS_S3_CALLING_FORMAT isn't relevant anymore
2017-08-02 20:00:03 +01:00
shireenrao
1871abd7e9 Setting up new project with mailhog without docker breaks use of mailhog (#553)
* add mailhog container for local development

* update local settings to use mailhog container for docker

* remove whitespace

* remove whitespace

* fix whitespace formatting

* another try to fix whitespace

* fix block error due to whitespace

* only use mailhog in docker if docker and mailhog is chosen in setup wizard

* Remove warning at end if using docker and mailhog

* mailhog should work locally without docker

* remove unnecessary check for docker in dev docker-compose file

* Remove section within local development docs referencing docker

As this document is meant as a how to for developing locally, I removed the section which was added for using mailhog in docker. I will add that section to the developing-locally-docker.rst file. Also removed jinja template as it does not work in docs.

* Added a comment on mailhog for local docker development

* fix hyperlink to #smtp-backend

* Added a comment on mailhog for local docker development

* pull docs/developing-locally-docker.rst from upstream

* remove changes from dev.yml and add comment for local.py

* Sync with pydanny:master
2017-06-26 22:21:32 +03:00
Shupeyko Nikita
1f7be4eb57 Revert "Node.JS + docker-compose = ♥" (#1206)
* Revert "[Fix] #1173 Nginx SSL redirect loop (#1174)"

This reverts commit cabcc7b106.

* Revert "Fix Getting Up and Running Locally With Docker doc sphinx warnings (#1165)"

This reverts commit 83c8594203.

* Revert "Fix index.rst sphinx warnings (#1166)"

This reverts commit 51dd0b5e73.

* Revert "Pin mailhog Docker image to v1.0.0 (#1201)"

This reverts commit d9f870461b.

* Revert "Node.JS + docker-compose = ♥ (#1128)"

This reverts commit 4b06fe3958.
2017-06-21 23:12:22 +03:00
Shupeyko Nikita
4b06fe3958 Node.JS + docker-compose = ♥ (#1128)
* Introduce static asset build infrastructure

* Enhance gulpfile.js

* Introduce node service

* BrowserSync debug-only support

* Remove newline before  BrowserSync debug-only support section

* FIx node Dockerfile package.json COPY

* Try fiixing node Dockerfile package.json COPY ones again

* Switch to `node:7-slim`

* Try switching to node:6

To account for possible node:7 docker-compose incompatibiltiy

* Revert "Try switching to node:6"

This reverts commit 62cc02df1a.

* Try switcging workdir to /app

* Try utilizing relative package.json path

* Resetting to the last version working locally with docker-compose 1.11.x

* Build upon the latest node:7.9-slim

* Stop dockerignoring package.json

* Fix typo

* Try a different package.json path

* Revert "Try a different package.json path"

This reverts commit f29f8500b8.

* Revert "Fix typo"

This reverts commit 02033729b5.

* Revert "Stop dockerignoring package.json"

This reverts commit 63c5491546.

* Upgrade docker-engine and docker-compose used by Travis CI

* Fix .travis.yml comments

* Inline docker-engine and docker-compose versions

* DEBUG: pwd

* Revert "DEBUG: pwd "

This reverts commit 6c2ed4321a.

* Try copying package.json to the same dir as node Dockerfile's

* Revert "Try copying package.json to the same dir as node Dockerfile's"

This reverts commit 24340a0783.

* Try out node:7.9

* Revert "Try out node:7.9"

This reverts commit 32286d33c2.

* Revert "Upgrade docker-engine and docker-compose used by Travis CI"

* Get rid of npm-check-updates

Reason: Reserved for the upcoming PR

* Get rid of npm-check

Reason: Reserved for the upcoming PR

* Get rid of 'standard' npm package

Reason: Reserved for the upcoming PR

* Clean up package.json

* Preserve package.json uncoditionally

Since we now have *unconditional* node.js integration, `package.json` must be out there whenever `node` service gets built

* Upgrade node service image to 7.10

* Document Node.js-Docker integration

* Fix gulpfile.js images region name

* Get rid of Gulp migrate task

* Document Gulp-Docker integration

* Introduce static asset build infrastructure

* Enhance gulpfile.js

* Introduce node service

* BrowserSync debug-only support

* Remove newline before  BrowserSync debug-only support section

* FIx node Dockerfile package.json COPY

* Try fiixing node Dockerfile package.json COPY ones again

* Switch to `node:7-slim`

* Try switching to node:6

To account for possible node:7 docker-compose incompatibiltiy

* Revert "Try switching to node:6"

This reverts commit 62cc02df1a.

* Try switcging workdir to /app

* Try utilizing relative package.json path

* Resetting to the last version working locally with docker-compose 1.11.x

* Build upon the latest node:7.9-slim

* Stop dockerignoring package.json

* Revert "Stop dockerignoring package.json"

This reverts commit 63c5491546.

* Fix typo

* Revert "Fix typo"

This reverts commit 02033729b5.

* Try a different package.json path

* Revert "Try a different package.json path"

This reverts commit f29f8500b8.

* Upgrade docker-engine and docker-compose used by Travis CI

* Fix .travis.yml comments

* Inline docker-engine and docker-compose versions

* DEBUG: pwd

* Revert "DEBUG: pwd "

This reverts commit 6c2ed4321a.

* Try copying package.json to the same dir as node Dockerfile's

* Revert "Try copying package.json to the same dir as node Dockerfile's"

This reverts commit 24340a0783.

* Try out node:7.9

* Revert "Try out node:7.9"

This reverts commit 32286d33c2.

* Revert "Upgrade docker-engine and docker-compose used by Travis CI"

* Get rid of npm-check-updates

Reason: Reserved for the upcoming PR

* Get rid of npm-check

Reason: Reserved for the upcoming PR

* Get rid of 'standard' npm package

Reason: Reserved for the upcoming PR

* Clean up package.json

* Preserve package.json uncoditionally

Since we now have *unconditional* node.js integration, `package.json` must be out there whenever `node` service gets built

* Upgrade node service image to 7.10

* Document Node.js-Docker integration

* Fix gulpfile.js images region name

* Get rid of Gulp migrate task

* Document Gulp-Docker integration

* Remove Gulp-Docker integraton not supported initialization message
2017-06-20 22:48:17 +03:00
Shupeyko Nikita
65e64fe364 Fix CELERY_BROKER_URL naming mismatch (#1143)
* Fix CELERY_BROKER_URL naming mismatch

Closes #1116

* Fix all occurences
2017-04-24 19:35:58 +03:00
Daniel Roy Greenfeld
6aced9ba73 Remove Python 2.7 support per #1129 (#1130)
* Remove Python 2.7 support per

* Remove Python 2.7 references

* Remove Python 2.7 references

* remove python 2 entirely
2017-04-21 12:31:45 -07:00
Nikita P. Shupeyko
c4e646214a Workaround flake8 "imported but unused" errors 2017-04-21 18:52:53 +03:00
Audrey Roy Greenfeld
5d78b32f2b Put local Docker setting into Jinja2 if block 2017-04-17 10:54:01 -07:00
William Archinal
f3ea2570ab Use Argon2 password hashing algorithm by default (#1079) 2017-03-16 19:19:42 -07:00
Burhan Khalid
04146d580e version bumps 2017-03-03 09:11:54 +03:00
Reggie Riser
2006605e24 A few cleanups: 1) Fixed common.py references (now called base.py), 2) Made URLs consistent in pointing to dev Django docs as well as https, (#1037) 2017-02-21 11:55:51 -08:00
Fábio C. Barrionuevo da Luz
a0efe83901 fix issue #1039 2017-02-15 18:15:16 -03:00
Mesut YILMAZ
3cd57880e0 Removed redeclared env 2017-02-15 11:17:34 +03:00
Jimmy Gitonga
f4ef73efbf ADDED: HTTPS is on by default (#1025)
ADDED: HTTPS is on by default. This will give a new user an
understanding of why Cookie Django is set up securely for deployment in
a production environment.
2017-02-13 12:27:09 -08:00
Daniel Roy Greenfeld
9a837171b6 Merge branch 'make-settings-consistent-w-req' of https://github.com/statwonk/cookiecutter-django into statwonk-make-settings-consistent-w-req 2017-02-13 10:48:10 -08:00
schacki
65611f14ea Updated settings to only include lists and ' (#930)
* Updated settings to only include lists and '

Substituted " with ' in files
Migrated tuples  to lists

* Added trailing slashes

- trailing slashes
- minor cleanups
2017-02-13 10:33:52 -08:00
Fábio C. Barrionuevo da Luz
83900ddfd3 fix typo 2017-02-03 14:12:52 -03:00
statwonk
62d86877e4 Missed a few references to the renamed settings file. This brings them inline. 2017-01-16 21:38:52 -06:00
statwonk
12a8875dce Two Scoops 1.8 on p. 56 indicates base.txt is preferred for consistency 2017-01-16 21:18:07 -06:00
Fábio C. Barrionuevo da Luz
06603dda17 fix W291 trailing whitespace on common.py 2017-01-09 15:39:27 -03:00
Fábio C. Barrionuevo da Luz
2af079f7aa load .env file if DJANGO_READ_DOT_ENV_FILE is True 2017-01-09 15:35:13 -03:00
Tim Freund
59948514ab 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.
2016-11-30 14:32:38 -08:00
Fábio C. Barrionuevo da Luz
a5c179594d revert last commit 2016-11-28 20:20:56 -03:00
Fábio C. Barrionuevo da Luz
0919cc438b Update common.py 2016-11-28 20:12:01 -03:00
Jérôme Hugon
4f3e18d0cc 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
2016-11-02 10:03:52 -07:00
Fabio C. Barrioneuvo da Luz
f040921d9a add default AUTH_PASSWORD_VALIDATORS 2016-09-29 01:43:48 -03:00
Fabio C. Barrioneuvo da Luz
f2aab6edc3 rename MIDDLEWARE_CLASSES to MIDDLEWARE 2016-09-29 01:43:48 -03:00
Daniel Roy Greenfeld
a091dcbae8 Fix elastic beanstalk checks 2016-09-29 01:43:48 -03:00
Daniel Roy Greenfeld
cac685d909 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
2016-09-29 01:43:48 -03:00
Delio Castillo
3d25befb3f Updates to anymail 0.5 and adds new config setting for MAILGUN_SENDER_DOMAIN 2016-09-22 11:42:16 -07:00
Audrey Roy Greenfeld
a46f3dd56b Change template debugging back to False
Since we're no longer using django_coverage_plugin.
2016-09-16 11:49:13 -07:00