-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py.sample
32 lines (24 loc) · 896 Bytes
/
config.py.sample
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
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
# Load any environment variables
load_dotenv(os.path.join(basedir, ".env"))
class Config(object):
SQLALCHEMY_DATABASE_URI = os.environ.get(
"DATABASE_URL"
) or "sqlite:///" + os.path.join(basedir, "app.db")
SQLALCHEMY_RECORD_QUERIES = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
# Set in .env
SECRET_KEY = os.environ.get("SECRET_KEY")
LOGIN_TOKEN = os.environ.get("LOGIN_TOKEN")
class TestConfig(object):
FLASK_TESTING = True
# Load JSON fixtures from this location.
FIXTURES_DIR = "tests/fixtures"
# Run all tests in memory. Keep track of queries for debugging.
SQLALCHEMY_DATABASE_URI = "sqlite:///"
SQLALCHEMY_RECORD_QUERIES = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
SECRET_KEY = "mysecret"
LOGIN_TOKEN = "mytoken"