-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sample.py
51 lines (36 loc) · 1.14 KB
/
config.sample.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
import os
import tzlocal
from events.collection import Collection
from requests.auth import HTTPBasicAuth
from ecdsa import SigningKey
# List of collections to serve
collections = {'1': Collection('https://example.com', HTTPBasicAuth('username', 'password'))}
# Http port
port = 8000
# Host to serve on
host = '127.0.0.1'
# Format for human readable dates
time_format = '%Y-%m-%d %H:%M:%S'
# Address to send emails from
email_from = '[email protected]'
# Smtp server address
smtp_server = 'smtp.example.com'
# Smtp server port
smtp_port = 587
# Secret key, used for csrf tokens
secret_key = os.urandom(32)
# Number of events to show in the homepage
recent_count = 20
# External url to this server
external_url = 'http://127.0.0.1:8000'
# Signing key for tokens
# Generate with:
# from ecdsa import SigningKey
# SigningKey.generate().to_pem()
signing_key = SigningKey.from_pem('-----BEGIN EC PRIVATE KEY-----\ ...')
# Timezone to use by default
timezone = tzlocal.get_localzone()
# Method to determine whether a request has admin access
# (check for credentials, or headers that could be set by a proxy server)
def is_admin(request):
return False