Moar environment variables

This commit is contained in:
Midgard 2020-07-25 12:21:53 +02:00
parent 10568e2b3d
commit 764959e70a
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -38,14 +38,14 @@ OWN_APPS = [
]
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_celery_beat'
] + OWN_APPS
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_celery_beat'
] + OWN_APPS
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
@ -143,19 +143,20 @@ STATICFILES_DIRS = [
CELERY_BROKER = os.getenv('CELERY_BROKER', 'redis://localhost:6379/0')
CELERY_BACKEND = os.getenv('CELERY_BACKEND', 'redis://localhost:6379/1')
# Custom stuff
SERVER_URL = 'http://localhost:8000'
# OAuth
BASE_URL = os.getenv('BASE_URL', 'http://localhost:8000')
AUTH_USER_MODEL = 'users.CustomUser'
_BASE_OAUTH_URL = 'https://adams.ugent.be/oauth'
_BASE_OAUTH_URL = os.getenv('OAUTH_BASE_URL', 'https://adams.ugent.be/oauth')
OAUTH = {
'USER_API_URI': f'{_BASE_OAUTH_URL}/api/current_user/',
'ACCESS_TOKEN_URI': f'{_BASE_OAUTH_URL}/oauth2/token/',
'AUTHORIZE_URI': f'{_BASE_OAUTH_URL}/oauth2/authorize/',
'REDIRECT_URI': f'{SERVER_URL}/login/zeus/authorized',
'CLIENT_ID': 'tomtest',
'CLIENT_SECRET': 'blargh',
'REDIRECT_URI': f'{BASE_URL}/login/zeus/authorized',
'CLIENT_ID': os.getenv('OAUTH_CLIENT_ID', 'tomtest'),
'CLIENT_SECRET': os.getenv('OAUTH_CLIENT_SECRET', 'blargh'),
}