From ac80104b5f6f834ad40c95f4736f661ce9d12195 Mon Sep 17 00:00:00 2001 From: andis Date: Sat, 17 Oct 2020 20:25:41 +0000 Subject: [PATCH] etherpad host setting --- fet2020/fet2020/settings.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fet2020/fet2020/settings.py b/fet2020/fet2020/settings.py index d993a93a..cb3c9ce9 100644 --- a/fet2020/fet2020/settings.py +++ b/fet2020/fet2020/settings.py @@ -1,3 +1,4 @@ + """ Django settings for fet2020 project. @@ -22,7 +23,9 @@ env = environ.Env( MYSQL_DATABASE=(str, "fet2020db"), MYSQL_USER=(str), MYSQL_PASSWORD=(str), - HOST_NAME=(str, "localhost") + HOST_NAME=(str, "localhost"), + ETHERPAD_PORT=(str,"9001"), + ETHERPAD_HOST=(str,"etherpad2.2020.fet.at") ) # Prints and logs are written to console @@ -227,13 +230,13 @@ THUMBNAIL_ALIASES = { if DEBUG: ETHERPAD_CLIENT = { - 'url': "http://localhost:9001", - 'exturl': "https://etherpad2.2020.fet.at/", + 'url': "http://etherpad:"+env('ETHERPAD_PORT'), + 'exturl': env('ETHERPAD_HOST'), 'apikey': "/srv/etherpad/APIKEY.txt" } else: ETHERPAD_CLIENT = { - 'url': "http://etherpad", + 'url': "http://etherpad:"+env('ETHERPAD_PORT'), 'exturl': urljoin(env('HOST_NAME'),"etherpad"), 'apikey': "/app/etherpad/APIKEY.txt" } @@ -244,7 +247,6 @@ REST_FRAMEWORK = { ] } -# ETHERPAD SETTINGS # DJANGO MAIL @@ -257,4 +259,3 @@ EMAIL_USE_TLS = True CRONJOBS = [ ('0 16 * * *', 'posts.cronjobs.check_to_send_agenda_mail'), ] ->>>>>>> b9c1517be5fca7a97ca270bfaa0624b5a7ef7148