From a6a5c8b06df9334e546795b96566d25c6396209a Mon Sep 17 00:00:00 2001 From: Louis Fill Date: Mon, 23 Sep 2013 14:50:50 +0100 Subject: [PATCH] [1.6.x] Fixed #21070 -- Added a more complex database configuration example. Thanks joejasinski for the suggestion. Backport of e15f7f31d0 from master --- docs/ref/settings.txt | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index b40b5389d3..32a115299a 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -419,12 +419,28 @@ SQLite. This can be configured using the following:: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': 'mydatabase' + 'NAME': 'mydatabase', } } -For other database backends, or more complex SQLite configurations, other options -will be required. The following inner options are available. +When connecting to other database backends, such as MySQL, Oracle, or +PostgreSQL, additional connection parameters will be required. See +the :setting:`ENGINE ` setting below on how to specify +other database types. This example is for PostgreSQL:: + + DATABASES = { + 'default': { + 'ENGINE':'django.db.backends.postgresql_psycopg2', + 'NAME': 'mydatabase', + 'USER': 'mydatabaseuser', + 'PASSWORD': 'mypassword', + 'HOST': '127.0.0.1', + 'PORT': '5432', + } + } + +The following inner options that may be required for more complex +configurations are available: .. setting:: DATABASE-ATOMIC_REQUESTS