Skip to content

Commit

Permalink
Allow override SOCIALACCOUNT_PROVIDERS from ops (#11165)
Browse files Browse the repository at this point in the history
* Allow override SOCIALACCOUNT_PROVIDERS from ops

* Property
  • Loading branch information
stsewd committed Mar 5, 2024
1 parent 7b1de53 commit d8a52ae
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def DOCKER_LIMITS(self):
SOCIALACCOUNT_AUTO_SIGNUP = False
SOCIALACCOUNT_STORE_TOKENS = True

SOCIALACCOUNT_PROVIDERS = {
_SOCIALACCOUNT_PROVIDERS = {
'github': {
"APPS": [
{
Expand Down Expand Up @@ -696,6 +696,16 @@ def DOCKER_LIMITS(self):
],
},
}

@property
def SOCIALACCOUNT_PROVIDERS(self):
"""
This is useful to override in a subclass, mainly to add the secrets when deploying.
Our ops repos have a complex (shared) inheritance structure, so it's easier this way.
"""
return self._SOCIALACCOUNT_PROVIDERS

ACCOUNT_FORMS = {
'signup': 'readthedocs.forms.SignupFormWithNewsletter',
}
Expand Down

0 comments on commit d8a52ae

Please sign in to comment.