-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.py
80 lines (65 loc) · 2.75 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Wahlfang configuration file.
# /etc/wahlfang/settings.py
from wahlfang.settings.base import *
from wahlfang.settings.wahlfang import *
#: Default list of admins who receive the emails from error logging.
ADMINS = (
('Mailman Suite Admin', 'root@localhost'),
)
# Postgresql datbase setup.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '<db_name>',
'USER': '<db_username>',
'PASSWORD': '<password>',
'HOST': 'localhost',
'PORT': '5432',
}
}
# 'collectstatic' command will copy all the static files here.
# Alias this location from your webserver to `/static`
STATIC_ROOT = '/var/www/wahlfang/static'
# Alias this location from your webserver to `/media`
MEDIA_ROOT = '/var/www/wahlfang/media'
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("127.0.0.1", 6379)],
},
},
}
# Make sure that this directory is created or Django will fail on start.
LOGGING['handlers']['file']['filename'] = '/var/log/wahlfang/wahlfang.log'
#: See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Good for debugging, keep it.
# "lists.your-domain.org",
# Add here all production domains you have.
]
SECRET_KEY = 'MyVerrySecretKey' # FIXME: PLEASE CHANGE ME BEFORE DEPLOYING TO PRODUCTION
# Mail, see https://docs.djangoproject.com/en/3.2/topics/email/#email-backends for more options
EMAIL_HOST = '<your mail server>'
EMAIL_SENDER = '<your mail sender>'
EMAIL_PORT = 25
# LDAP, leave commented out to not use ldap authentication
# for more details see https://django-auth-ldap.readthedocs.io/en/latest/example.html
# AUTHENTICATION_BACKENDS = {
# 'vote.authentication.AccessCodeBackend',
# 'management.authentication.ManagementBackend',
# 'management.authentication.ManagementBackendLDAP', # this authentication backend must be enabled for ldap auth
# 'django.contrib.auth.backends.ModelBackend'
# }
# AUTH_LDAP_SERVER_URI = "ldap://ldap.stusta.de"
# AUTH_LDAP_USER_DN_TEMPLATE = "cn=%(user)s,ou=account,ou=pnyx,dc=stusta,dc=mhn,dc=de"
# AUTH_LDAP_START_TLS = True
# AUTH_LDAP_USER_ATTR_MAP = {'email': 'mail'}
# AUTH_LDAP_BIND_AS_AUTHENTICATING_USER = True
# Wahlfang specific settings
# Whether to send election invitations / reminders from the Election Managers E-Mail or from `EMAIL_SENDER`
SEND_FROM_MANAGER_EMAIL = True
# List of valid domain names for your election managers emails in case `SEND_FROM_MANAGER_EMAIL` is True
# This has to be configured such that the mail server can actually send mails from the valid manager emails.
VALID_MANAGER_EMAIL_DOMAINS = []
URL = '<domain of your web server, e.g. "vote.stustanet.de">'