Moar environment variables
This commit is contained in:
parent
10568e2b3d
commit
764959e70a
1 changed files with 15 additions and 14 deletions
|
@ -38,14 +38,14 @@ OWN_APPS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'django_celery_beat'
|
'django_celery_beat'
|
||||||
] + OWN_APPS
|
] + OWN_APPS
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
|
@ -143,19 +143,20 @@ STATICFILES_DIRS = [
|
||||||
|
|
||||||
CELERY_BROKER = os.getenv('CELERY_BROKER', 'redis://localhost:6379/0')
|
CELERY_BROKER = os.getenv('CELERY_BROKER', 'redis://localhost:6379/0')
|
||||||
CELERY_BACKEND = os.getenv('CELERY_BACKEND', 'redis://localhost:6379/1')
|
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'
|
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 = {
|
OAUTH = {
|
||||||
'USER_API_URI': f'{_BASE_OAUTH_URL}/api/current_user/',
|
'USER_API_URI': f'{_BASE_OAUTH_URL}/api/current_user/',
|
||||||
'ACCESS_TOKEN_URI': f'{_BASE_OAUTH_URL}/oauth2/token/',
|
'ACCESS_TOKEN_URI': f'{_BASE_OAUTH_URL}/oauth2/token/',
|
||||||
'AUTHORIZE_URI': f'{_BASE_OAUTH_URL}/oauth2/authorize/',
|
'AUTHORIZE_URI': f'{_BASE_OAUTH_URL}/oauth2/authorize/',
|
||||||
'REDIRECT_URI': f'{SERVER_URL}/login/zeus/authorized',
|
'REDIRECT_URI': f'{BASE_URL}/login/zeus/authorized',
|
||||||
'CLIENT_ID': 'tomtest',
|
'CLIENT_ID': os.getenv('OAUTH_CLIENT_ID', 'tomtest'),
|
||||||
'CLIENT_SECRET': 'blargh',
|
'CLIENT_SECRET': os.getenv('OAUTH_CLIENT_SECRET', 'blargh'),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue