]> git.ozlabs.org Git - patchwork/commitdiff
settings: Use multiple-DB-style format for default settings
authorJeremy Kerr <jk@ozlabs.org>
Tue, 19 Apr 2011 05:18:45 +0000 (13:18 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 19 Apr 2011 05:18:45 +0000 (13:18 +0800)
The DATABASE_* settings have been deprecated in django 1.3, replaced by
the multiple-database style format (introduced in 1.2, which patchwork
requires anyway).

This change modifies the default settings.py to use the new format.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/settings.py

index f56da70ea02b871ce84dc816283c430cbf3a3328..24d376259dff926ecab7ee9ebfca3ef670b7a19b 100644 (file)
@@ -10,12 +10,12 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
-DATABASE_ENGINE = 'postgresql_psycopg2'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_NAME = 'patchwork'             # Or path to database file if using sqlite3.
-DATABASE_USER = ''             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.postgresql_psycopg2',
+        'NAME': 'patchwork',
+    },
+}
 
 # Local time zone for this installation. Choices can be found here:
 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE