Database
Format: {scheme}://{user}:{password}@{host}:{port}/{database}?{parameters}
SQLite
SQLite accepts the following three formats:
in-memory database:
sqlite://:memory:relative path:
sqlite:///db.sqlite3absolute path:
sqlite:////var/run/sqlite.db
Schemes
mysql:
django.db.backends.mysqloracle:
django.db.backends.oraclepgsql:
django.db.backends.postgresqlpostgres:
django.db.backends.postgresqlpostgresql:
django.db.backends.postgresqlsqlite:
django.db.backends.sqlite3sqlite3:
django.db.backends.sqlite3
Note
You can add more schemes with add_scheme().
Parameters
You can define database options as query parameters.
conn_max_age: CONN_MAX_AGE
autocommit: AUTOCOMMIT
atomic_requests: ATOMIC_REQUESTS
search_path: PostgreSQL search path
isolation: PostgreSQL isolation level (
uncommitted/serializable/repeatable/committed/autocommit)
Other parameters will be passed to OPTIONS as is.
See also