Merge branch 'master' of https://git.fet.at/bofh/fet2020
This commit is contained in:
@@ -37,6 +37,8 @@ services:
|
|||||||
DB_NAME: etherpaddb
|
DB_NAME: etherpaddb
|
||||||
DB_USER: user
|
DB_USER: user
|
||||||
DB_PASS: hgu
|
DB_PASS: hgu
|
||||||
|
TRUST_PROXY: "true"
|
||||||
|
REQUIRE_SESSION: "true"
|
||||||
depends_on:
|
depends_on:
|
||||||
- etherpadsql
|
- etherpadsql
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -40,7 +40,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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
Django settings for fet2020 project.
|
Django settings for fet2020 project.
|
||||||
|
|
||||||
@@ -12,6 +13,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),
|
||||||
@@ -20,7 +23,9 @@ env = environ.Env(
|
|||||||
MYSQL_DATABASE=(str, "fet2020db"),
|
MYSQL_DATABASE=(str, "fet2020db"),
|
||||||
MYSQL_USER=(str),
|
MYSQL_USER=(str),
|
||||||
MYSQL_PASSWORD=(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
|
# Prints and logs are written to console
|
||||||
@@ -191,7 +196,7 @@ STATIC_URL = '/assets/'
|
|||||||
STATICFILES_DIRS = [
|
STATICFILES_DIRS = [
|
||||||
os.path.join(BASE_DIR, "static")
|
os.path.join(BASE_DIR, "static")
|
||||||
]
|
]
|
||||||
|
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/'
|
||||||
|
|
||||||
@@ -222,13 +227,28 @@ THUMBNAIL_ALIASES = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# ETHERPAD SETTINGS
|
|
||||||
ETHERPAD_CLIENT = {
|
if DEBUG:
|
||||||
'url': "http://localhost:9003",
|
ETHERPAD_CLIENT = {
|
||||||
'exturl': "https://etherpad2.2020.fet.at/",
|
'url': "http://etherpad:"+env('ETHERPAD_PORT'),
|
||||||
'apikey': "/srv/andis_test/etherpad_test2/etherpad-lite/APIKEY.txt",
|
'exturl': env('ETHERPAD_HOST'),
|
||||||
|
'apikey': "/srv/etherpad/APIKEY.txt"
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
ETHERPAD_CLIENT = {
|
||||||
|
'url': "http://etherpad:"+env('ETHERPAD_PORT'),
|
||||||
|
'exturl': urljoin(env('HOST_NAME'),"etherpad"),
|
||||||
|
'apikey': "/app/etherpad/APIKEY.txt"
|
||||||
|
}
|
||||||
|
|
||||||
|
REST_FRAMEWORK = {
|
||||||
|
'DEFAULT_PERMISSION_CLASSES': [
|
||||||
|
'rest_framework.permissions.AllowAny',
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# DJANGO MAIL
|
# DJANGO MAIL
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
EMAIL_HOST = 'buran.htu.tuwien.ac.at'
|
EMAIL_HOST = 'buran.htu.tuwien.ac.at'
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ def show(request, id=None):
|
|||||||
if post_author:
|
if post_author:
|
||||||
author_image = post_author.image['avatar'].url
|
author_image = post_author.image['avatar'].url
|
||||||
|
|
||||||
ep_agenda_link = None
|
ep_agenda_link = "#"
|
||||||
ep_protocol_link = None
|
ep_protocol_link = "#"
|
||||||
|
|
||||||
if p.has_agenda and p.agenda_key:
|
if p.has_agenda and p.agenda_key:
|
||||||
ep_agenda_link = get_pad_link(p.agenda_key)
|
ep_agenda_link = get_pad_link(p.agenda_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user