-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.py
41 lines (31 loc) · 1.3 KB
/
config.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
# SPDX-FileCopyrightText: 2023 PeARS Project <community@pearsproject.org>
#
# SPDX-License-Identifier: AGPL-3.0-only
from os.path import abspath, dirname, join
from pathlib import Path
# Statement for enabling the development environment
DEBUG = True
# Define the application directory
BASE_DIR = abspath(dirname(__file__))
Path(join(BASE_DIR,'app/db')).mkdir(parents=True, exist_ok=True)
# Define the database - we are working with
# SQLite for this example
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + join(BASE_DIR, 'app/db/app.db')
DATABASE_CONNECT_OPTIONS = {}
# Application threads. A common general assumption is
# using 2 per available processor cores - to handle
# incoming requests using one and performing background
# operations using the other.
THREADS_PER_PAGE = 2
# Enable protection agains *Cross-site Request Forgery (CSRF)*
CSRF_ENABLED = True
# Use a secure, unique and absolutely secret key for
# signing the data. Enter your own here.
CSRF_SESSION_KEY = "sdfkjhlskghisalughlsaighlishgoiegjosgjolgjoeijg"
# Secret key for signing cookies. Enter your own here.
SECRET_KEY = "xcvbcmvbjxbvjxvhjcxbvmxhvmxbjihkmsghxhcufxmskufhkms"
SQLALCHEMY_TRACK_MODIFICATIONS = False
# To ensure utf-8 is handled properly by jsonify
JSON_AS_ASCII = False
# To ensure json preserves order of dictionaries
JSON_SORT_KEYS = False