Commit Graph

111 Commits

Author SHA1 Message Date
Nikita P. Shupeyko
b069f8e40e Fix E303 in production.py 2018-05-21 21:57:52 +03:00
Nikita P. Shupeyko
600be33b85 Fix E402 in production.py 2018-05-21 21:57:31 +03:00
Nikita P. Shupeyko
5b6c8a89d3 Fix flake8 errors in wsgi.py 2018-05-21 21:36:03 +03:00
Nikita P. Shupeyko
c3baadd8c7 Set DEBUG=True unconditionally in local config 2018-05-14 10:21:33 +03:00
saschalalala
6d4be405d8 Migrate to Django2 path urls (#1637)
* Change users urls to Django 2 paths

* Change config urls to Django 2 paths

* Change admin url setting to Django 2 path syntax

* Replace more admin urls

* Add myself to contributors.rst
2018-05-14 10:09:24 +03:00
Nikita P. Shupeyko
fd15b20a08 Use string interpolation in production STATIC_URL 2018-05-13 17:03:04 +03:00
Nikita P. Shupeyko
661fc3e449 Fix E402 2018-05-09 13:42:20 +03:00
Nikita P. Shupeyko
a07327459c Fix logging module imported unconditionally in production.py 2018-05-09 13:24:08 +03:00
Nikita P. Shupeyko
df1ce737d5 Replace os.environ.get with env call in local.py 2018-05-09 13:15:41 +03:00
Nikita P. Shupeyko
00ff5c8506
Fix a typo in production.py 2018-05-07 20:33:34 +03:00
Osaetin Daniel
a4f059196e Removed unnecessary sentry configuration (#1598) 2018-04-10 10:39:44 +08:00
Daniel Roy Greenfeld
3f753e0411
First pass at running black across the project (#1602) 2018-04-08 17:03:29 -05:00
Nikita P. Shupeyko
26ccf9307f Fix REDIS_URL missing
Fixes #1570.
2018-04-04 13:42:01 +03:00
Nikita P. Shupeyko
418b53bf77 Rename use_sentry_for_error_reporting to use_sentry
Rationale: consistency
2018-04-03 12:12:26 +03:00
Wan Liuyang
d1198f63b1
Drop Opbeat (#1578) 2018-03-21 19:54:27 +08:00
jose Gabriel Guzman Lopez
0601a1b858
Local
add  "127.0.0.1"
2018-03-16 11:35:39 -05:00
Daniel Roy Greenfeld
b32fd78012
Update base.py 2018-03-13 22:21:01 -05:00
Daniel Roy Greenfeld
19501ef26b
Adding DRF 2018-03-13 22:17:46 -05:00
Malik S
6c8538abfe Add all internal IPs for multiple docker networks (#1520)
* 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
2018-03-08 15:54:24 +03:00
Wan Liuyang
9cb7e50b8e Convert old-styled string formatting to f-string (#1528)
* 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
2018-03-06 19:56:27 +03:00
Nikita Shupeyko
d2791b019a
Prettify and re-order settings entries (#1550)
* 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
2018-03-06 14:28:25 +03:00
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
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