* Update generated project's .gitignore
* Post-gen gitignore .env/ and .env
* Fix linesep between gitignored entries
* Persist `.env/**/*` files into cookiecutter-django's VCS
* Rename .env/ to .envs/
* Reference the newly created .envs/**/.* files in local.yml
* Reference the newly created .envs/**/.* files in production.yml
* Delete .env.example
* Refactor post-gen-project.py
Closes#1299.
* Implement production-dotenv-files-to-dotenv-file merge script
* Create shared PyCharm Run Configuration for the automation script
* Randomize POSTGRES_PASSWORD in ./envs/(.local|.production)/.postgres
* Default POSTGRES_PASSWORD and POSTGRES_USER to random values
* Fix jinja linebreaks in local.yml
* Spaces in production.yml
* Fix post-merge leftovers & set DJANGO_ADMIN_URL automatically
* Prettify here and there
* Fix FileNotFoundError
* Leave a TODO in post_gen_hook.py
* Introduce keep_local_envs_in_vcs option
* Remove envs when not opted for
* Inline pre_gen_project.py if-condition
* Get rid of PROJECT_DIR_PATH in post_gen_project.py
* Clean up the docs
* Match copyright notices
* Document envs ins and outs
* Add all internal IPs for multiple docker networks
When developing with modified docker-compose.yml that contains multiple
network definitions, all networks gateways of the created container
should be added to INTERNAL_IPS, otherwise Django-Debug-Toolbar will not
work.
* Add @flyudvik to contributors
* 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.
* Move to the python:alpine docker image
- Switch the base images for local and production to alpine
- Install extra dependencies for psycopg2, Pillow and cffi
- Change shebang for shell scripts to use sh instead of bash
* Move to the python:alpine docker image
- Migrate group and user creation to Alpine syntax
* Move to the python:alpine docker image
- Remove `function` keyword, unsupported in shell
* Upgrade various places to the latest Python 3.6
* Test support for translations
* Add gettext library, required for translations support
* Add locale folder for translations support with README documenting it
* Update Changelog
* Tweak command to test translations support
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.
* 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.
* Add Bootstrap to package.json in case of custom_bootstrap_compilation
* Update JS task runners and base HTML to handle custom scss compilation
* Generate a vendors.js with custom bootstrap compilation + Gulp
* Update documentation accordingly
* Add missing if/endif in gulpfile
* Update to Bootstrap v4 final
- Refactor django.core.urlresolvers module import to django.urls. Resolves: The django.core.urlresolvers module is removed in favor of its new location, django.urls.
- Add an app namespace to urls in user app. Resolves: Support for setting a URL instance namespace without an application namespace is removed.
This is to ensure running `pytest` in project root works when using Python 3.6 (otherwise tries to run python tests in `node-gyp` node module and fails with:
```
―――――――――――――――――――――――――――――――――――――――――――― ERROR collecting node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py ――――――――――――――――――――――――――――――――――――――――――――
../venv/lib/python3.6/site-packages/_pytest/python.py:395: in _importtestmodule
mod = self.fspath.pyimport(ensuresyspath=importmode)
../venv/lib/python3.6/site-packages/py/_path/local.py:662: in pyimport
__import__(modname)
E File "/Users/ivan/Projects/Minireference/ClassroomLinksProject/classroomlinks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 37
E print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]),
E ^
E SyntaxError: invalid syntax
```
* 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
* 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