diff options
| author | Louis Fill <louis@louistranslation.co.uk> | 2013-09-23 14:50:50 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-23 12:18:00 -0400 |
| commit | e15f7f31d048ead5453b5ee810235cf88b42b3cc (patch) | |
| tree | 35ea08cfff1bcd07137b8fa44c56eb1aba409500 /docs | |
| parent | 41167645b1039067127fa215d4d28296bfa4cfdc (diff) | |
Fixed #21070 -- Added a more complex database configuration example.
Thanks joejasinski for the suggestion.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/settings.txt | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index a8b629e693..facfe2fb26 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 <DATABASE-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 |
