diff --git a/eva/settings_production.py b/eva/settings_production.py index c81f04e..c0c1a42 100644 --- a/eva/settings_production.py +++ b/eva/settings_production.py @@ -25,9 +25,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = '10.0.6.25' EMAIL_PORT = '25' -# Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent - # get secrets with open(os.path.join(BASE_DIR, 'secrets.json')) as secrets_file: secrets = json.load(secrets_file) @@ -47,7 +44,7 @@ def get_secret(setting, secrets=secrets): SECRET_KEY = get_secret('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True # send mails only to debug mode adress even if in production MAILTEST = True @@ -55,9 +52,6 @@ MAILTEST = True # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ -# SECURITY WARNING: keep the secret key used in production secret! -# SECRET_KEY = 'g%+i6+gkwt3zz@+k-5x1dtstuw4)&qd$lxd^bt2oswy5e1#dul' - STATIC_ROOT = BASE_DIR / 'staticfiles' ALLOWED_HOSTS = ['*'] @@ -73,6 +67,11 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django.contrib.sites', + 'allauth', + 'allauth.account', + 'allauth.socialaccount', + 'allauth.socialaccount.providers.nextcloud', 'multiselectfield', 'formtools', ] @@ -157,3 +156,21 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/' + +# settings needed for allauth +SOCIALACCOUNT_PROVIDERS = { + 'nextcloud': { + 'SERVER': 'https://wolke.wikimedia.de/', + } +} + +AUTHENTICATION_BACKENDS = ( + "django.contrib.auth.backends.ModelBackend", + "allauth.account.auth_backends.AuthenticationBackend", +) + +SITE_ID = 1 + +ACCOUNT_EMAIL_VERIFICATION = 'none' + +LOGIN_REDIRECT_URL = 'home'