## Description
Fixes#591.
## Rationale
We are currently not testing many combinations, we run Flake8 on the generated project with default options, but that rarely catch any issues.
## Use case(s) / visualization(s)
Catch problems with invalid combinations, for instance, it fails due to Whitenoise breaking flake8 with `django-compressor` because `STATIC_URL` was undefined here:
b91c70d755/%7B%7Bcookiecutter.project_slug%7D%7D/config/settings/production.py (L185)
* Create a test matrix on Travis CI to help testing multiple options
* Change test_docker.sh to fail if any command in it fails
* Run black on the CI with --check option
* Fix formatting of project files using black
* Install black in the docker container
* Exclude migrations in black checks
* Fix Black formatting violations
* Run black on the whole generated project & fix issues
sorl-thumbnail serialized and deserializes the storage class and during this
process location parameter is lost if factory is used. Using a full-fledge
storage class fixes this issue.
See: https://stackoverflow.com/a/18046120/104731
* Convert old-styled string formatting to f-string
* Update flake8 explicit version to 3.5.0
* Make tox.ini in sync with requirements.txt
* Fix annoying flake8 F405
* Prettify and re-order settings entries
* Use old-style .format() for the time being
* Remove redundant linebreaks at the settings files' beginning
* Fix E303 too many blank lines
* Remove a redundant linebreak from requirements.txt
* Some linebreake juggling in config.settings.base
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.
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.
* 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
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.
- 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
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.
* Updated settings to only include lists and '
Substituted " with ' in files
Migrated tuples to lists
* Added trailing slashes
- trailing slashes
- minor cleanups
Includes:
* First pass at Elastic Beanstalk integration
* Gets code and elasticache working
* Very rudimentary documentation
* Includes post hook cleanup
* 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
* 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
* #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
* 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