-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.py.example
100 lines (87 loc) · 4.12 KB
/
config.py.example
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import os
# On a new deployment (whether production or development) make
# a copy of this file called 'config.py' and change 'False' for
# SECRET_KEY to a newly generated string using these python commands:
# $ import os
# $ os.urandom(32)
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SESSION_COOKIE_SAMESITE = "Strict"
SECRET_KEY = False
SERVER_NAME = 'waarismijnstemlokaal.nl'
PREFERRED_URL_SCHEME = 'https'
FORCE_HOST_FOR_REDIRECTS = 'waarismijnstemlokaal.nl'
USE_SESSION_FOR_NEXT = True
BABEL_DEFAULT_LOCALE = 'nl'
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:<DB_PASSWORD>@mysql:3306/stembureaus'
SQLALCHEMY_TRACK_MODIFICATIONS = False
# If 'False', allows gemeenten to add stembureaus. Set to 'True' once the
# election day has passed as gemeenten are not allowed to add/edit
# stembureaus anymore.
UPLOAD_DEADLINE_PASSED = False
# Path for waarismijnstemlokaal.nl/<SIGNUP_FORM_PATH>
SIGNUP_FORM_PATH = ''
# Title for waarismijnstemlokaal.nl/<SIGNUP_FORM_PATH>
SIGNUP_FORM_TITLE = ''
# The signup form can have these three states:
# 'open-collecting': Before Wims is ready for gemeenten to be invited and
# enter their stembureaus we already want to collect as
# many of their email addresses as possible, so the form
# is opened up. We simply store the email addresses
# entered during this phase in a .csv which is later
# used when the invites are sent.
# 'open-mailing': Once all the gemeenten are invited and allowed to enter
# their stembureaus, we still keep this form open. If a new
# email address is entered we don't write it to the .csv
# but directly add the user to the database and send out an
# invitation email.
# 'closed': Once the gemeenten can no longer change their stembureaus (so a
# few days before the election or on/directly after the election)
# we also want to close this form so no new signups are possible.
SIGNUP_FORM_STATE = ''
CKAN_URL = ''
CKAN_API_KEY = ''
# List the resource IDs of the elections which are allowed to be
# edited. The ID can be found in the CKAN URL of the resource, e.g.
# https://ckan.dataplatform.nl/dataset
# /stembureaus-nederland-gemeenteraadsverkiezingen-2018/resource
# /2fc13394-c2fc-4492-843c-cba07e4bf8f5.
# 'publish_resource' contains the IDs of resources
# of upcoming elections where the stemlokalen data will be made
# public, while the 'draft_resource' contains the IDs of
# resources where drafts of the stemlokalen data will be saved while
# the gemeenten input all the information. For 'election_number'
# fill in a unique number of this election in the format '001',
# '002', etc. Check the 'election_number' of the previous
# election and increment it with 1 to get the election number of
# this election. For 'election_date' fill in the date of the
# election in 'YYYYMMDD' format, e.g. '20180321'.
# NOTE 1: Use the exact same '<name of election>' values in
# the 'verkiezingen' field in 'app/data/gemeenten.json'
# NOTE 2: Make sure to capitalize the Provinciale Stateverkiezingen,
# Tweede Kamerverkiezingen and Europese Parlementsverkiezingen and don't
# capitalize the other elections
CKAN_CURRENT_ELECTIONS = {
'<name of election>': {
'publish_resource': '<ID_of_resource>',
'draft_resource': '<ID_of_resource>',
'election_number': '<unique_number_for_this_election>',
'election_date': '<date_of_this_election>'
}
}
# Stembureaumanager URL and API key
STEMBUREAUMANAGER_BASE_URL = ''
STEMBUREAUMANAGER_API_KEY = ''
# TSA URL and API Key
TSA_BASE_URL = ''
TSA_API_KEY = ''
# Procura URL and API Key
PROCURA_BASE_URL = ''
PROCURA_API_KEY = ''
MAIL_SERVER = ''
MAIL_PORT = ''
MAIL_USE_TLS = True
MAIL_USERNAME = ''
MAIL_PASSWORD = ''
FROM = ''
ADMINS = ['']