config.py.example 4.82 KB
Newer Older
Robin Sonnabend's avatar
Robin Sonnabend committed
1
2
# (local) database
SQLALCHEMY_DATABASE_URI = "postgresql://user:password@host/database" # change this
Robin Sonnabend's avatar
Robin Sonnabend committed
3
SQLALCHEMY_TRACK_MODIFICATIONS = False # do not change
4

Robin Sonnabend's avatar
Robin Sonnabend committed
5
SECRET_KEY = "something random" # change this
6

7
DEBUG = False
8

Robin Sonnabend's avatar
Robin Sonnabend committed
9
# mailserver (optional)
10
11
12
MAIL_ACTIVE = True
MAIL_FROM = "protokolle@example.com"
MAIL_HOST = "mail.example.com:465"
13
14
15
MAIL_USER = "user" # set to "" for unauthenticated sending
MAIL_PASSWORD = "password" # set to "" for unauthenticated sending
MAIL_USE_TLS = True # should match the port in MAIL_HOST (if present there)
16
MAIL_USE_STARTTLS = False # Usually, it's either this or SMTPS
17

Robin Sonnabend's avatar
Robin Sonnabend committed
18
# (local) message queue (necessary)
19
CELERY_BROKER_URL = "redis://localhost:6379/0"
Robin Sonnabend's avatar
Robin Sonnabend committed
20
21
CELERY_TASK_SERIALIZER = "pickle" # do not change
CELERY_ACCEPT_CONTENT = ["pickle"] # do not change
22

Robin Sonnabend's avatar
Robin Sonnabend committed
23
# CUPS printserver (optional)
Robin Sonnabend's avatar
Robin Sonnabend committed
24
25
26
27
28
29
30
31
PRINTING_ACTIVE = True
PRINTING_SERVER = "printsrv.example.com:631"
PRINTING_USER = "protocols"
PRINTING_PRINTERS = [
    "example_printer": ["Duplex=DuplexNoTumble", "option2=value"],
    "other_printer": ["list", "of", "options"]
]

Robin Sonnabend's avatar
Robin Sonnabend committed
32
33
34
# etherpad (optional)
ETHERPAD_ACTIVE = True
ETHERPAD_URL = "https://example.com/etherpad"
Robin Sonnabend's avatar
Robin Sonnabend committed
35
36
37
38
39
40
41
42
EMPTY_ETHERPAD = """Welcome to Etherpad!

This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!

Get involved with Etherpad at http://etherpad.org

""" # do not change

Robin Sonnabend's avatar
Robin Sonnabend committed
43
# wiki (optional)
Robin Sonnabend's avatar
Robin Sonnabend committed
44
45
46
47
48
49
50
WIKI_ACTIVE = True
WIKI_API_URL = "https://wiki.example.com/wiki/api.php"
WIKI_ANONYMOUS = False
WIKI_USER = "user"
WIKI_PASSWORD = "password"
WIKI_DOMAIN = "domain" # set to None if not necessary

Robin Sonnabend's avatar
Robin Sonnabend committed
51
52
53
54
# CalDAV calendar (optional)
CALENDAR_ACTIVE = True
CALENDAR_URL = "https://user:password@calendar.example.com/dav/"
CALENDAR_DEFAULT_DURATION = 3 # default meeting length in hours
Robin Sonnabend's avatar
Robin Sonnabend committed
55
CALENDAR_MAX_REQUESTS = 10
Robin Sonnabend's avatar
Robin Sonnabend committed
56

Robin Sonnabend's avatar
Robin Sonnabend committed
57
SESSION_PROTECTION = "strong" # do not change
Robin Sonnabend's avatar
Robin Sonnabend committed
58

Robin Sonnabend's avatar
Robin Sonnabend committed
59
# authentication
Robin Sonnabend's avatar
Robin Sonnabend committed
60
SECURITY_KEY = "some other random string" # change this
Robin Sonnabend's avatar
Robin Sonnabend committed
61
62
63
64
65
66
67
68
69
70
AUTH_MAX_DURATION = 300
AUTH_BACKENDS = [
    LdapManager(
        host="ldap.example.com",
        user_dn="uid={},ou=users,dc=example,dc=com",
        group_dn="dc=example,dc=com"),
    ADManager(
        host="ad.example.com",
        domain="EXAMPLE",
        user_dn="cn=users,dc=example,dc=com",
71
72
        group_dn="dc=example,dc=com",
        ca_cert="/etc/ssl/certs/example-ca.pem")
Robin Sonnabend's avatar
Robin Sonnabend committed
73
]
Robin Sonnabend's avatar
Robin Sonnabend committed
74

75
76
OBSOLETION_WARNING = """Please migrate your account!"""

Robin Sonnabend's avatar
Robin Sonnabend committed
77
# lines of error description
78
ERROR_CONTEXT_LINES = 3
79

Robin Sonnabend's avatar
Robin Sonnabend committed
80
# pagination
Robin Sonnabend's avatar
Robin Sonnabend committed
81
82
83
PAGE_LENGTH = 20
PAGE_DIFF = 3

Robin Sonnabend's avatar
Robin Sonnabend committed
84
85
86
87
88
# upcoming meetings within this number of days from today are shown on the index page
MAX_INDEX_DAYS = 14

# mail to contact in case of complex errors
ADMIN_MAIL = "admin@example.com"
89
ADMIN_GROUP = "admin"
Robin Sonnabend's avatar
Robin Sonnabend committed
90
91
92
93
94
95
96

# accept protocols even with some errors
# useful for importing old protocols
# not recommended for regular operation
PARSER_LAZY = False

# minimum similarity (0-100) todos need to have to be considered equal
97
FUZZY_MIN_SCORE = 90
Robin Sonnabend's avatar
Robin Sonnabend committed
98

99
# choose something nice from fc-list
Robin Sonnabend's avatar
Robin Sonnabend committed
100
# Nimbus Sans looks very much like Computer Modern
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
FONTS = {
    "main": {
        "regular": "Nimbus Sans",
        "bold": "NimbusSans",
        "italic": "NimbusSans",
        "bolditalic": "NimbusSans"
    },
    "roman": {
        "regular": "Nimbus Roman",
        "bold": "Nimbus Roman",
        "italic": "Nimbus Roman",
        "bolditalic": "Nimbus Roman"
    },
    "sans": {
        "regular": "Nimbus Sans",
        "bold": "NimbusSans",
        "italic": "NimbusSans",
        "bolditalic": "NimbusSans"
    },
    "mono": {
        "regular": "Nimbus Mono PS",
        "bold": "Nimbus Mono PS",
        "italic": "Nimbus Mono PS",
        "bolditalic": "Nimbus Mono PS"
    }
}
Robin Sonnabend's avatar
Robin Sonnabend committed
127

Robin Sonnabend's avatar
Robin Sonnabend committed
128
# local filesystem path to save documents
Robin Sonnabend's avatar
Robin Sonnabend committed
129
130
DOCUMENTS_PATH = "documents"

Robin Sonnabend's avatar
Robin Sonnabend committed
131
# keywords indicating private protocol parts
Robin Sonnabend's avatar
Robin Sonnabend committed
132
133
PRIVATE_KEYWORDS = ["private", "internal", "privat", "intern"]

Robin Sonnabend's avatar
Robin Sonnabend committed
134
# list of bulletpoints to use in latex
135
136
137
138
139
140
LATEX_BULLETPOINTS = [
    r"\textbullet",
    r"\normalfont \bfseries \textendash",
    r"\textasteriskcentered",
    r"\textperiodcentered"
]
141
142
143
144
145
146
147
148
149
150
151
152
153
154

# optional: path to additional jinja-templates
#LATEX_LOCAL_TEMPLATES = "local-templates"
# optional: the template to include at the top of protocol.tex
#LATEX_LOGO_TEMPLATE = "asta-logo.tex"
# optional: custom protocol page geometry
#LATEX_GEOMETRY = "bottom=1.6cm,top=1.6cm,inner=2.5cm,outer=1.0cm,footskip=1.0cm,headsep=0.6cm"
# optional: custom protocol pagestyle
#LATEX_PAGESTYLE = "fancy"
# optional: additional latex packages
#LATEX_ADDITIONAL_PACKAGES = ["[absolute]{textpos}", "{fancyheadings}"]
# optional: include header and footer in asta-style, not just a page number on top
#LATEX_HEADER_FOOTER = True

155
156
157
158
159
160
161
162
163
HTML_LEVEL_OFFSET = 3

def dummy_todomail_provider():
    return {"example": ("Name", "mail@example.com")}

# list of functions that return dicts mapping todomail-keys to a tuple containing name and mail address
ADDITIONAL_TODOMAIL_PROVIDERS = [
    dummy_todomail_provider
]