Commit Graph

199 Commits

Author SHA1 Message Date
Tano Abeleyra
0f388a6d96
Fix minor typo 2020-04-11 14:49:04 -03:00
Duda Nogueira
819e9ff273
Adding some spaces to pass build :P 2020-04-07 19:29:46 -03:00
Duda Nogueira
1d2d881aba
Fix INTERNAL_IPS for DOCKER when ip higher than 9
previously, for IP ex: 172.19.0.13 becomes: 172.19.0.11
now, it becomes 172.19.0.1
2020-04-07 18:53:09 -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
ea5db6c4f4
Django 3.0 support (#2469)
* Bump Django version to 3.0.x to see what breaks

* Update places where Django 2.2 is mentioned to 3.0

* Update to latest Django 3.0 version

* Bump version in setup.py
2020-03-23 21:41:51 +00:00
Bruno Alla
5498716c74 Fix isort 2020-03-17 15:35:42 +00:00
Bruno Alla
d2988040d5 Merge branch 'master' into pathlib-migration-updated 2020-03-17 14:16:35 +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
Bruno Alla
530868d072 Move "rest_framework" in THIRD_PARTY_APPS 2020-03-15 19:20:44 +00:00
Bruno Alla
729cd2adab Merge branch 'master' into drf-auth-token 2020-03-15 19:19:36 +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
jeromecaisip
bfe463fa7c
Update base.py 2020-03-02 19:27:07 +01:00
jeromecaisip
fa6ca7b1c8
Add rest_framework.authtoken on installed apps.
Add rest_framework.authtoken on installed apps when the option to use DRF is selected,  because the endpoint
'/auth-token/" depends on the said app.
2020-03-02 19:16:33 +01: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
Bruno Alla
2fb40f3f8c
Option for DRF with extra fixes (#2410)
Option for DRF with extra fixes
2020-01-28 10:27:26 +00:00
Dani Hodovic
54a38bfb43 Allow rendering custom widgets from root templates dir (#2356)
* Allow rendering custom widgets from root templates dir

Rendering custom widgets from the projects root template directory
doesn't work out of the box.

See: https://stackoverflow.com/questions/45844032/django-templatedoesnotexist-in-case-of-a-custom-widget/46208414#46-208414

This changes the setting to use the same template finding logic that the
TEMPLATES setting uses.

* update APP_DIRS=True

* fixup! update APP_DIRS=True
2020-01-28 09:55:09 +00:00
Bruno Alla
fa9a8cfe7b Fix code formatting 2020-01-23 18:10:30 +00:00
Bruno Alla
949d8b684c Merge branch 'master' into drf-option-with-tests
# Conflicts:
#	hooks/post_gen_project.py
2020-01-23 14:41:42 +00:00
Bo
1609d4410e
Fix loaders option in test environment as well 2020-01-14 21:19:44 -06: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
Dani Hodovic
1dd8608142
Add django.middleware.common.BrokenLinkEmailsMiddleware
https://docs.djangoproject.com/en/2.2/howto/error-reporting/#errors

> If those conditions are met, Django will email the users listed in the
> MANAGERS setting whenever your code raises a 404 and the request has a
> referer. It doesn’t bother to email for 404s that don’t have a referer –
> those are usually just people typing in broken URLs or broken Web bots.
> It also ignores 404s when the referer is equal to the requested URL,
> since this behavior is from broken Web bots too.
2019-12-10 12:46:52 +01: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
Jerome Caisip
548417612f Additonal option to setup DRF. 2019-09-17 23:24:09 +08:00
Dani Hodovic
69566f5456
Add context processor for settings variables
This allows for usage of settings variables in templates, e.g

```
{% if settings.USE_ANALYTICS %}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ settings.GOOGLE_TAG_MANAGER_ID }}" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{% endif %}
```
2019-09-05 13:24:47 +02:00
Bruno Alla
baab918874
Remove AWS_PRELOAD_METADATA (#2204)
Remove AWS_PRELOAD_METADATA
2019-09-04 20:34:23 +02:00
Bruno Alla
8c131fe603
Merge pull request #2206 from danihodovic/remove-duplicate-debug
Remove redundant DEBUG = False in test.py
2019-09-04 20:30:10 +02:00
Dani Hodovic
180ab9bbb1
Remove redundant DEBUG = False in test.py
This is already set to False by default in base.py
2019-08-26 16:25:36 +02: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
7ad8791937
Remove EMAIL_HOST, EMAIL_PORT for console backend
django.core.mail.backends.console.EmailBackend is an in memory backend
so EMAIL_HOST and EMAIL_PORT does not need to be specified in this case.
2019-08-21 17:31:18 +02:00
Jules Chéron
ec80a05671
Handle path with pathlib
- Update config/settings/base.py
- Update merge_production_dotenvs_in_dotenv.py
- Update wsgi.py
- Update manage.py
2019-07-10 20:35:38 +02:00
Bruno Alla
6ca6d50ed8
Add EMAIL_TIMEOUT (#2153)
Add EMAIL_TIMEOUT
2019-07-09 12:08:15 +01:00
Bruno Alla
34c045ef60
Remove EMAIL_HOST & EMAIL_PORT with locmem backend (#2152)
Remove EMAIL_HOST & EMAIL_PORT with locmem backend
2019-07-09 11:24:48 +01:00
Dani Hodovic
35b201a2b3
Add EMAIL_TIMEOUT
Adds EMAIL_TIMEOUT to prevent a blocking send on the tcp socket from
halting the thread handling the request.
2019-07-09 09:11:50 +08:00
Dani Hodovic
1469739109
Remove EMAIL_HOST & EMAIL_PORT with locmem backend
These settings should not be required since Django never connects to an
external component when sending email. Instead it's stored in memory.

https://docs.djangoproject.com/en/2.2/topics/email/#in-memory-backend
2019-07-09 09:07:38 +08: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
Dani Hodovic
87a8acbae2
Remove redundant template debug setting
> 'debug': a boolean that turns on/off template debug mode. If it is
> True, the fancy error page will display a detailed report for any
> exception raised during template rendering. This report contains the
> relevant snippet of the template with the appropriate line highlighted.

> It defaults to the value of the DEBUG setting.

https://docs.djangoproject.com/en/2.2/topics/templates/#module-django.template.backends.django

I could be wrong about this, but it seems like setting the template
DEBUG setting is redundant, since it should follow whatever the DEBUG
variable is set to.
2019-06-20 23:41:31 +08:00
Keyvan Mosharraf
e9e79428d3 Better way to include django_celery_beat in INSTALLED_APPS 2019-05-31 03:45:59 -07:00
Keyvan Mosharraf
aee9f3ecfa Install django_celery_beat in the proper way 2019-05-30 17:00:07 -07:00