-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
35 lines (27 loc) · 1.21 KB
/
settings.py
File metadata and controls
35 lines (27 loc) · 1.21 KB
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
import os
import schema.scenario as scenarioSchema
DOMAIN = {'scenarios': scenarioSchema.scenarios}
# Let's just use the local mongod instance. Edit as needed.
# Please note that MONGO_HOST and MONGO_PORT could very well be left
# out as they already default to a bare bones local 'mongod' instance.
MONGO_HOST = os.environ['MONGO_HOST']
MONGO_PORT = int(os.environ["MONGO_PORT"])
# Skip this block if your db has no auth. But it really should.
MONGO_USERNAME = os.environ["MONGO_USERNAME"]
MONGO_PASSWORD = os.environ["MONGO_PASSWORD"]
# Name of the database on which the user can be authenticated,
# needed if --auth mode is enabled.
MONGO_AUTH_SOURCE = os.environ["MONGO_AUTH_SOURCE"]
MONGO_DBNAME = os.environ["MONGO_DBNAME"]
# Enable reads (GET), inserts (POST) and DELETE for resources/collections
# (if you omit this line, the API will default to ['GET'] and provide
# read-only access to the endpoint).
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
# Enable reads (GET), edits (PATCH), replacements (PUT) and deletes of
# individual items (defaults to read-only item access).
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
IF_MATCH = False
X_DOMAINS = "*"
X_HEADERS = ["Content-Type"]
HATEOAS = False
PAGINATION = False