sqldsn.rst 808 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. sqldsn
  2. ======
  3. :synopsis: Prints Data Source Name connection string on stdout
  4. Supported Databases
  5. -------------------
  6. Currently the following databases are supported:
  7. * PostgreSQL (psycopg2 or postgis)
  8. * Sqlite3
  9. * MySQL
  10. Patches to support other databases are welcome! :-)
  11. Exit Codes
  12. ----------
  13. Exit status is 0
  14. Example Usage
  15. -------------
  16. ::
  17. # Prints the DSN for the default database
  18. $ ./manage.py sqldsn
  19. ::
  20. # Prints the DSN for all databases
  21. $ ./manage.py sqldsn --all
  22. ::
  23. # Print the DSN for database named 'slave'
  24. $ ./manage.py sqldsn --router=slave
  25. ::
  26. # Print all DSN styles available for the default database
  27. $ ./manage.py sqldsn --style=all
  28. ::
  29. # Create .pgpass file for default database by using the quiet option
  30. $ ./manage.py sqldsn -q --style=pgpass > .pgpass