On Sun, Feb 10, 2019, at 6:54 PM, Nick Wynja wrote:
On 02/10/19 at 08:57, brian@emwd.com <brian@emwd.com> wrote:
"In your
settings_local.py
copy the whole INSTALLED_APPS section from default settings and add/remove the auth providers you want/don't want. Notice theallauth.socialaccount.providers.<provider>
in the list below."Another option, which seems more future-proof, is to strictly remove the account providers you don't want from INSTALLED_APPS rather than defining INSTALLED_APPS locally.
First, you have to access INSTALLED_APPS by importing settings into settings_local.py:
from settings import *
Then, you can set INSTALLED_APPS to everything it already is minus the social providers:
INSTALLED_APPS = [a for a in INSTALLED_APPS if not a.startswith('allauth.socialaccount.providers') and not a.startswith('django_mailman3.lib.auth.fedora')]
This way if Postorius ever adds any apps you won't need to update your local settings. Anyone see any downsides to doing it this way?
Please don't do that, it will create a circular import since settings_local.py is imported by settings.
Postorius (actually, allauth) adding more providers won't affect the INSTALLED_APPS list, which is a static setting defined in the container images. Unless the image changes that list, it won't affect you.
Having the list customized is actually good for you, since there is some extra configuration required for adding a new provider, so you don't want something to just show up without you knowing.
-- thanks, Abhilash Raj (maxking)