Commit Graph

109 Commits

Author SHA1 Message Date
Tano Abeleyra
70f6471c75 Allow to use a CDN with S3 2020-05-17 12:37:35 -03:00
Tano Abeleyra
95ca7ca291 Update django-redis links 2020-04-24 21:29:59 -03:00
Bruno Alla
56d5e271aa Remove isort exception in production config & fix issue 2020-03-23 21:46:14 +00:00
Bruno Alla
c4b1666707 Move storages classes into their own module 2020-03-23 21:46:14 +00:00
Bruno Alla
e97573dfda
Merge pull request #2435 from Andrew-Chen-Wang/master
Add all supported Anymail Providers
2020-03-16 19:59:25 +00:00
Bruno Alla
ca7fcb8f62
Merge pull request #2442 from jameswilliams1/fix-django-compressor-settings
Fix broken Django Compressor setup and enable static files minification
2020-03-16 19:53:02 +00:00
Andrew-Chen-Wang
5e1d1dd1c3 Fixed tests for mail providers 2020-03-14 15:09:05 -04:00
Andrew-Chen-Wang
3978890502 Adjusted readability
* Changed Vanilla/Plain Django-Anymail to Other SMTP
* Made Mailgun default again
* config/production.py adjusted if conditions according to @browniebroke
2020-03-14 13:43:37 -04:00
Andrew-Chen-Wang
9cf72849e6 Merged parent repo and configured refurbished tests 2020-03-14 13:29:08 -04:00
Bruno Alla
fab6b8724a Test isort flake8-isort & fix issues
fixes #2123
2020-03-03 20:04:31 +00:00
James Williams
89f85f1255
- configure compressor when not using s3
- update django start script to compress if using whitenoise and compress enabled

- add to contributors.rst
2020-02-28 15:59:14 +00:00
Andrew-Chen-Wang
ac884f3f75 Updated mail service docs
* Trying to appease the Black-linter god...
2020-02-06 20:18:49 -05:00
Andrew-Chen-Wang
0621929cd2 Removed None option for mail service
* This is necessary in order to be compatible with Django-allauth
2020-02-06 18:41:30 -05:00
Andrew-Chen-Wang
c8eb5462eb Configurations and Packages added
* Production settings updated for all
* Added env vars from production settings
* Added packages requirements.txt
2020-02-06 16:58:15 -05:00
Bo
15fc92ace1
Assuming DTL to be the last instead of first template engine 2020-01-14 08:50:38 -06:00
Daniel Hillier
0872982245 Fix failing mypy tests in users app with django-stubs (#2395)
Adds django-stubs as a requirement for local virtualenv. This is
required now that the User Model type is being resolved properly.
2020-01-13 01:57:20 +11:00
Yuchen Xie
0374f11d09 Using WhiteNoise in development 2019-11-07 21:03:33 +08:00
Yuchen Xie
400fcc4030 Prevent collectfast from guessing a wrong strategy
If `COLLECTFAST_STRATEGY` is not provided in `settings`, `collectfast` has to guess a "strategy". For the case with AWS, it guesses `BotoStrategy` in stead of `S3Boto3Storage`, which is a wrong decision as we `pip install django-storages[boto3]` (`boto3` in favor of `boto`).

Setting `COLLECTFAST_STRATEGY` is also encouraged as `collectfast` is not going to guess the strategy in the future.

Ref:
* f37dd1faa2/collectfast/management/commands/collectstatic.py (L33)
* f37dd1faa2/collectfast/strategies/base.py (L170)
2019-10-22 10:42:32 +08:00
Caio Ariede
ff8a9de24e Updates 2019-10-04 09:32:25 -03:00
Caio Ariede
39e745dddf Fix #2250 -- No staticfile storage with GCP without Whitenoise 2019-10-02 10:10:32 -03:00
Dani Hodovic
d4d8f1b5be
Remove AWS_PRELOAD_METADATA
https://github.com/antonagestam/collectfast/pull/140
2019-08-25 14:08:28 +02:00
Dani Hodovic
a25c406975
Remove gunicorn from installed apps
I can't find the requirement of adding it to INSTALLED_APPS on the
Django or the Gunicorn docs.

https://docs.gunicorn.org/en/latest/run.html?highlight=django#django
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/gunicorn/
2019-07-09 09:00:31 +08:00
Bruno Alla
7e47e9c2aa
Mailgun api url (#2014)
Mailgun api url
2019-05-28 11:27:54 +01:00
Tano Abeleyra
9a3a796a89 Use GCP acronym for Google Cloud Platform 2019-05-27 17:39:45 -03:00
Bruno Alla
b56071f516 Fix comments and empty lines in prod settings 2019-05-27 16:33:07 +01:00
Bruno Alla
881a6fd681 Change GCP settings to f-strings 2019-05-27 15:58:56 +01:00
Bruno Alla
b4cea81f26 Fix some comment and empty lines in settings 2019-05-27 15:55:41 +01:00
Bruno Alla
92e4bdf171
Make cloud_provider optional (#2067)
Make cloud_provider optional
2019-05-27 15:50:18 +01:00
Demetris Stavrou
a636d454f6
Update {{cookiecutter.project_slug}}/config/settings/production.py
Co-Authored-By: Bruno Alla <browniebroke@users.noreply.github.com>
2019-05-22 09:46:20 +03:00
Demetris Stavrou
38b2c2dfcd Errors are now sent to Sentry 2019-05-21 22:04:03 +03:00
Tano Abeleyra
de7be3652a Make cloud_provider optional
Some projects may not need AWS or GCS
2019-05-19 12:45:28 -03:00
shireenrao
8c69a1203f
Update {{cookiecutter.project_slug}}/config/settings/production.py
Co-Authored-By: Bruno Alla <browniebroke@users.noreply.github.com>
2019-05-19 08:27:28 -04:00
shireenrao
adcc5d0b28
Update {{cookiecutter.project_slug}}/config/settings/production.py
Co-Authored-By: Bruno Alla <browniebroke@users.noreply.github.com>
2019-05-19 08:27:14 -04:00
shireenrao
570930ef13
If using whitenoise disable AWS and GCE for static
If using whitenoise disable AWS and GCE for static setting.
2019-05-18 22:49:10 -04:00
Bruno Alla
d90406c3c3 Make the static storage use public ACL 2019-05-18 14:06:05 +01:00
Bruno Alla
0fef828375 Create a logging config in base settings & add a root logger to existing ones 2019-05-15 17:20:14 +01:00
Craig Margieson
5ab5285e5f Edit STATIC and MEDIA urls for GCE production. 2019-05-06 15:13:01 +09:30
anuj
2b141e6464 Add support for GCE static 2019-04-07 00:54:46 +05:30
anuj
b5e030b784 Corrected quotes, added parameter in tests 2019-04-07 00:34:22 +05:30
anuj
cad0b77658 Added support for GCE Media storage 2019-04-05 12:42:39 +05:30
Bruno Alla
81851ffb6d Merge branch 'master' into mailgun_api_url 2019-04-02 15:45:37 +01:00
Jelmert
d1bf4f4815 Added AWS_S3_REGION_NAME to production settings 2019-04-02 15:43:48 +02:00
Jelmert
17e7d603cf Added the MAILGUN_API_URL variable to the ANYMAIL configuration so we can easily switch to the EU region for mailgun 2019-04-02 15:08:51 +02:00
Bruno Alla
4e70a4b55a
Test all possible template combinations (#1993)
## 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)
2019-04-01 08:47:46 +01:00
Guilherme Fabrizio
7d1e90bdf5 Migrate to unified Sentry SDK (#1820)
The raven library is deprecated. Replace it by the new sentry-sdk library:

https://docs.sentry.io/error-reporting/quickstart/?platform=python

fixes #1818
2019-03-20 10:04:44 +00:00
Bruno Alla
6e9f87fced Set AWS_DEFAULT_ACL to None as per django-storages documentation
fixes #1885
2019-03-19 19:57:31 +00:00
Bruno Alla
68f7268770
Run Black on Travis (#1957)
* 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
2019-03-18 17:49:43 +00:00
Carl Johnson
1753812136 Settings: Use security settings in dev as well as prod 2018-11-12 15:04:03 -05:00
Chris Pappalardo
ea53635a0a fixed production bugs in caddyfile and middleware 2018-09-15 12:45:10 -07:00
Umair Ashraf
bf6c7e8e9c fixed s3 http url for static and media storage 2018-09-12 13:45:30 -04:00