Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

Django - Database

Back


settings.py variables

# default
DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": "mydatabase",
    }
}
Options Description Default
ENGINE The database backend to use. ''
HOST The host to use ''
NAME The name of the database to use. ''
PASSWORD The password to use ''
PORT The port to use ''
OPTIONS Extra parameters to use {}
ATOMIC_REQUESTS Wether wrap each view in a transaction. False
AUTOCOMMIT Wether automatically commit transcation True
CONN_MAX_AGE The lifetime of a database connection 0
CONN_HEALTH_CHECKS health check before connections are reused False
TIME_ZONE the time zone for this database connection None
DISABLE_SERVER_SIDE_CURSORS Wether to disable the use of server-side cursors False
USER The username to use ''
TEST A dictionary of settings for test databases {}

MySQL DB


Top