forked from shuhaowu/projecto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
69 lines (55 loc) · 1.37 KB
/
settings.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
DEBUG = bool(int(os.environ.get("DEBUG", 0)))
TESTING = bool(int(os.environ.get("TESTING", 0)))
# could be dev, stage, or prod
SERVER_MODE = os.environ.get("SERVER_MODE", "dev")
HOST = os.environ.get("HOST", "127.0.0.1")
PORT = os.environ.get("PORT", 8800)
APP_FOLDER = os.path.dirname(os.path.abspath(__file__))
STATIC_FOLDER = os.path.join(APP_FOLDER, "static")
TEMPLATES_FOLDER = os.path.join(APP_FOLDER, "templates")
FILES_FOLDER = os.path.join(APP_FOLDER, "userfiles")
RIAK_NODES = [
{
"host": "127.0.0.1",
"pb_port": 8087
}
]
DATABASE_NAMES = (
"USERS",
"PROJECTS",
"FEED",
"COMMENTS",
"TODOS",
"ARCHIVED_FEED",
"ARCHIVED_TODOS",
"FILES",
"SIGNUPS"
)
DATABASE_PREFIX = "test_" if TESTING else ""
MAX_CONTENT_LENGTH = 20 * 1024 * 1024
SECRET_KEY = None
SITE_URL = "http://dev.getprojecto.ml"
# To be removed when we are ready.
DISABLE_SIGNUP = False
API = "projecto.apiv1"
LOADED_MODULES = [
"comments",
"feed",
"files",
"profile",
"projects",
"todos",
]
GOOGLE_ANALYTICS_ID = ""
GOOGLE_ANALYTICS_DOMAIN = ""
try:
from settings_local import *
except ImportError:
pass
DATABASES = {}
for dbname in DATABASE_NAMES:
dbname = dbname.lower()
DATABASES[dbname] = DATABASE_PREFIX + dbname
if SECRET_KEY is None or SITE_URL is None:
raise RuntimeError("SECRET_KEY and SITE_URL are required to run projecto!")