Etherpadfix Teil1

This commit is contained in:
2020-10-17 11:00:30 +00:00
parent 15d2e7cedb
commit d4a44a05a4
2 changed files with 28 additions and 9 deletions

View File

@@ -38,7 +38,12 @@ def add_ep_cookie(request, response):
domain=".2020.fet.at", domain=".2020.fet.at",
path="/" path="/"
) )
response.set_cookie(
"sessionID",
ep_sessid,
expires=expires,
path="/etherpad"
)
return response return response

View File

@@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
import os import os
import environ import environ
from urllib.parse import urljoin
env = environ.Env( env = environ.Env(
# set casting, default value # set casting, default value
DEBUG=(bool, True), DEBUG=(bool, True),
@@ -186,10 +188,9 @@ USE_TZ = True
STATIC_URL = '/assets/' STATIC_URL = '/assets/'
STATICFILES_DIRS = [ STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"), os.path.join(BASE_DIR, "static")
os.path.join(BASE_DIR, "static_design1"),
] ]
STATIC_ROOT = 'assets/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'files/') MEDIA_ROOT = os.path.join(BASE_DIR, 'files/')
MEDIA_URL = '/files/' MEDIA_URL = '/files/'
@@ -219,9 +220,22 @@ THUMBNAIL_ALIASES = {
}, },
} }
ETHERPAD_CLIENT = {
'url': "http://localhost:9003",
'exturl': "https://etherpad2.2020.fet.at/",
'apikey': "/srv/andis_test/etherpad_test2/etherpad-lite/APIKEY.txt"
if DEBUG:
ETHERPAD_CLIENT = {
'url': "http://localhost:9001",
'exturl': "https://etherpad2.2020.fet.at/",
'apikey': "/srv/etherpad/APIKEY.txt"
}
else:
ETHERPAD_CLIENT = {
'url': "http://etherpad",
'exturl': urljoin(env('HOST_NAME'),"etherpad"),
'apikey': "/app/etherpad/APIKEY.txt"
}
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
]
} }