You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
298 B
15 lines
298 B
3 years ago
|
from os import environ
|
||
|
from databases import Database
|
||
|
|
||
|
|
||
|
TESTING = bool(environ.get("TESTING", False))
|
||
|
|
||
|
|
||
|
if TESTING:
|
||
|
DATABASE_URL = "sqlite:///tests/server/testfiles/test.db"
|
||
|
else:
|
||
|
# Временно.
|
||
|
DATABASE_URL = "sqlite:///calculate/server/tmp.db"
|
||
|
|
||
|
database = Database(DATABASE_URL)
|