File: settings.py

package info (click to toggle)
django-cte 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: python: 3,460; makefile: 7
file content (20 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import json

if "DB_SETTINGS" in os.environ:
    _db_settings = json.loads(os.environ["DB_SETTINGS"])
else:
    # sqlite3 by default
    # must be sqlite3 >= 3.8.3 supporting WITH clause
    # must be sqlite3 >= 3.35.0 supporting MATERIALIZED option
    _db_settings = {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": ":memory:",
    }

DATABASES = {'default': _db_settings}

INSTALLED_APPS = ["tests"]

SECRET_KEY = "test"
USE_TZ = False