docs/sqldsn.rst
:synopsis: Prints Data Source Name connection string on stdout
Currently the following databases are supported:
Patches to support other databases are welcome! :-)
Currently the following databases are supported:
+----------+------------+-------+---------+---------------------------+
| Style | PostgreSQL | MySQL | Sqlite3 | Description |
+==========+============+=======+=========+===========================+
| args | | Y | | command-line arguments |
+----------+------------+-------+---------+---------------------------+
| filename | | | Y | filename |
+----------+------------+-------+---------+---------------------------+
| keyvalue | Y | Y | | key-value pairs (legacy) |
+----------+------------+-------+---------+---------------------------+
| kwargs | Y | | | Python keyword arguments |
+----------+------------+-------+---------+---------------------------+
| pgpass | Y | | | .pgpass format |
+----------+------------+-------+---------+---------------------------+
| uri | Y | Y | Y | (See dj-database-url) |
+----------+------------+-------+---------+---------------------------+
Exit status is 0 unless invalid options were given.
::
$ ./manage.py sqldsn
::
$ ./manage.py sqldsn --all
::
$ ./manage.py sqldsn --database=slave
::
$ ./manage.py sqldsn --style=all
::
$ ./manage.py sqldsn -q --style=uri
::
$ ./manage.py sqldsn -q --style=pgpass > .pgpass