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.sqlite3

  • absolute path: sqlite:////var/run/sqlite.db

Schemes

  • mysql: django.db.backends.mysql

  • oracle: django.db.backends.oracle

  • pgsql: django.db.backends.postgresql

  • postgres: django.db.backends.postgresql

  • postgresql: django.db.backends.postgresql

  • sqlite: django.db.backends.sqlite3

  • sqlite3: django.db.backends.sqlite3

Note

You can add more schemes with add_scheme().

Parameters

You can define database options as query parameters.

Other parameters will be passed to OPTIONS as is.

See also