Commit Graph

236 Commits

Author SHA1 Message Date
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
David
b24d0d0bd8 Fixes wsgi.py app_path to avoid deleting all /config occurrences. (#1467) 2018-02-03 00:01:28 +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
Daniel Roy Greenfeld
b0fe04fc52 First pass at Bootstrap 4 Alpha 6, just the basic layout 2017-04-20 15:18:30 -07:00
Audrey Roy Greenfeld
5d78b32f2b Put local Docker setting into Jinja2 if block 2017-04-17 10:54:01 -07:00
Daniel Roy Greenfeld
8b82dfae8a Change order of modern django debug toolbar. 2017-04-17 10:51:58 -07:00
Daniel Roy Greenfeld
ba2301fc3c Fix multiple imports on one line 2017-04-13 11:30:57 -07:00
Daniel Roy Greenfeld
a3b0feec12 Flake8 fix 2017-04-13 11:27:54 -07:00
Audrey Roy Greenfeld
6453fea417 Easier placement of apps within the second level directory 2017-04-13 10:48:44 -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
bbcd408193 add django-debug-toolbar urlpatterns 2016-09-29 13:09:49 -03:00
Fabio C. Barrioneuvo da Luz
b4e6e08100 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
2016-09-29 01:43:48 -03: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
Audrey Roy Greenfeld
da42b3854d Turn on template debugging in test settings
This resolves the following error:

``` bash
coverage run ./manage.py test --settings=config.settings.test
Coverage.py warning: Disabling plugin 'django_coverage_plugin.DjangoTemplatePlugin' due to an exception:
Traceback (most recent call last):
  File "/Users/audreyr/.virtualenvs/everycheese/lib/python3.5/site-packages/coverage/control.py", line 517, in _should_trace_internal
    file_tracer = plugin.file_tracer(canonical)
  File "/Users/audreyr/.virtualenvs/everycheese/lib/python3.5/site-packages/django_coverage_plugin/plugin.py", line 154, in file_tracer
    check_debug()
  File "/Users/audreyr/.virtualenvs/everycheese/lib/python3.5/site-packages/django_coverage_plugin/plugin.py", line 69, in check_debug
    "Template debugging must be enabled in settings."
django_coverage_plugin.plugin.DjangoTemplatePluginException: Template debugging must be enabled in settings.
```
2016-09-16 11:05:57 -07:00
Bartłomiej Kurzeja
d53afa6c96 Remove misleading comment (#787)
ImproperlyConfigured exception won't raise because default value is passed.
2016-09-12 15:52:49 +02:00
Jannis Gebauer
7d7b044432 Remove webpack and merge (#778) (#785)
* Remove webpack and merge

* Put postgresql_version line back in cookiecutter.json

* Put goldhand back in contributors file, added ssteinerX

* Add *.egginfo to .gitignore

* Fix dangling endif in README.rst
2016-09-12 00:22:21 +02:00
Alexandre Provencio
b2207f5768 Pep8 imports (#767) 2016-09-10 13:32:14 +02:00
Jannis Gebauer
3ad0f57ef5 Merge pull request #765 from aleprovencio/fix-compressor
Fix compressor section on common.py
2016-09-02 09:49:32 +02:00
Jannis Gebauer
0f527271a3 Merge pull request #766 from aleprovencio/separator-line
Put separator line following the current pattern
2016-09-02 09:49:16 +02:00
Jannis Gebauer
bf69bfe40e Merge pull request #769 from aleprovencio/whitespace
Fix whitespace around operator
2016-09-02 09:48:41 +02:00
Alexandre Provencio
31c63f0d3f Fix compressor section on common.py 2016-08-31 14:44:24 -03:00
Alexandre Provencio
86c1cd5f26 Fix whitespace around operator 2016-08-31 12:59:36 -03:00
Alexandre Provencio
b33b104251 Put separator line following the current pattern 2016-08-31 12:56:25 -03:00
Alexandre Provencio
3ad2d5c61e Fix docstrings 2016-08-31 12:48:25 -03:00
yunti
6224a15884 Update crispy forms template pack (#718)
Updated to be inline with bootstrap 4 currently used in the project
2016-08-16 12:22:16 -07:00
Daniel Roy Greenfeld
b1e7f55b6b Update common.py 2016-07-14 12:06:29 -07:00
Audrey Roy Greenfeld
14729d8c04 Clean up module comment 2016-06-24 02:42:36 +08:00
Audrey Roy Greenfeld
958bdee3e5 Settings file for running tests faster 2016-06-24 02:41:44 +08:00
Will Farley
8880e777d2 WIP: Add webpack as an option (#610)
* Add webpack as an option

Adds webpack as a js_taskrunner option to cookiecutter-json. Will clone @hzdg/cookiecutter-webpack --pydanny-django branch into the project using cookiecutter's api in post_hooks.

The static webpack project will be placed into the <project_slug>/static/<project_slug>/ directory.
The webpack configs are placed in the ./config/ directory.

The cookiecutter-webpack project includes react / redux / karma configurations that are brought into the project.

* Add webpack documentation
2016-06-19 12:24:43 -07:00
Daniel Roy Greenfeld
bf15e018c2 Switch to using apps.py with Users app 2016-06-18 13:18:40 -07:00
Julien Almarcha
13faa21799 automatically update INTERNAL_IPS (#600)
* change local config to automatically update INTERNAL_IPS when developping with docker

* Update local.py

Move import to top

* Update local.py

Bug fix and remove blank line

* Update local.py

* flake8 compliance

* add env var check before updating INTERNAL_IPS

* flake8 compliance

* flake8 compliance
2016-06-17 19:09:08 -07:00
Andres Gonzalez
3d2385a3b6 Add django-compressor suport (#568)
* #342 Add compressor option to requirements

* #342 Add compressor to production settings

* #342 Add compressor to base template

* #342 Add settings to common.py and add tags to base template

* #342 Flake8 fix for tox tests

* #342 Remove redundant line

* #342 Add required options for S3 to production.py and added Env variable to enable/disable compression

* #342 Add required options for compressor on S3 to production.py
2016-06-17 19:07:45 -07:00
Daniel Roy Greenfeld
fd2e7dd0fe Whitespace fix 2016-06-05 11:04:48 -07:00
Daniel Roy Greenfeld
f40f304457 Use sentry for error reporting 2016-06-05 10:47:07 -07:00
Leonardo
907b8ecfbd Remove django-secure (#579)
* Eliminate django-secure from requirements and settings files

* Include secure defaults for django security middleware

* Add settings required by SecurityMiddleware

also remove django-secure in prod settings

* Eliminate empty spaces generated on Jinja on
config/settings/production.py
2016-06-03 16:07:27 -07:00
Daniel Roy Greenfeld
05c521dd61 remove errant line 2016-05-29 14:53:26 -07:00
Daniel Roy Greenfeld
e84f0a488d PEP8 fix 2016-05-29 10:08:39 -07:00
Audrey Roy Greenfeld
a658339b99 Switch from django-mailgun to django-anymail. Fix #539. 2016-05-27 11:31:30 -07:00
Jannis Gebauer
24d75ebe45 resolved merge conflicts 2016-05-22 20:18:08 +02:00
Audrey Roy Greenfeld
779365c9f0 Clarify how ROOT_DIR is calculated 2016-05-17 16:15:53 -07:00
Daniel Roy Greenfeld
c7c1d0bfa1 Remove Raven 404 catch middleware. Fix #367 2016-05-11 21:53:30 -07:00
Fabio C. Barrioneuvo da Luz
2b878fcf36 replace occurrences of readthedocs.org to readthedocs.io 2016-05-09 17:18:58 -03:00
Trung Dong Huynh
3c6898b3f6 Updated whitenoise configuration to match changes in version 3.0
(see http://whitenoise.evans.io/en/stable/changelog.html)
2016-05-08 11:55:32 +01:00
Daniel Roy Greenfeld
7a5712c379 Check to confirm that the user has a modern version of Cookiecutter. 2016-04-25 14:10:39 -07:00
Audrey Roy Greenfeld
15f350f05e Change repo_name to project_slug for clarity. 2016-04-20 10:00:35 -07:00