]> git.ozlabs.org Git - patchwork/commitdiff
INSTALL: Update the database configuration instructions
authorDamien Lespiau <damien.lespiau@intel.com>
Sun, 31 Aug 2014 00:02:36 +0000 (01:02 +0100)
committerJeremy Kerr <jk@ozlabs.org>
Sun, 7 Sep 2014 12:07:39 +0000 (20:07 +0800)
That's the "new" (django 1.5+) way of defining databases, strictly
following the instructions wasn't working. This should save the next
user a bit of time.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
docs/INSTALL

index 5716ed231b59ac36dc6e4e3f68ad17e3011cb67e..dad9c7efa0caf4776bfaaf456e7b70d80e87e947 100644 (file)
@@ -52,12 +52,16 @@ in brackets):
         settings, using local_settings.py (see below) to override the defaults
         in settings.py:
 
         settings, using local_settings.py (see below) to override the defaults
         in settings.py:
 
-        DATABASE_ENGINE = 'postgresql_psycopg2'
-        DATABASE_NAME = 'patchwork'
-        DATABASE_USER = 'patchwork'
-        DATABASE_PASSWORD = 'my_secret_password
-        DATABASE_HOST = 'localhost'
-        DATABASE_PORT = ''
+        DATABASES = {
+            'default': {
+                'ENGINE': 'django.db.backends.postgresql_psycopg2',
+                'HOST': 'localhost',
+                'PORT': '',
+                'USER': 'patchwork',
+                'PASSWORD': 'my_secret_password',
+                'NAME': 'patchwork',
+            },
+        }
 
     For MySQL:
         $ mysql
 
     For MySQL:
         $ mysql
@@ -69,12 +73,16 @@ in brackets):
        settings, using local_settings.py (see below) to override the defaults
        in settings.py:
 
        settings, using local_settings.py (see below) to override the defaults
        in settings.py:
 
-       DATABASE_ENGINE = 'mysql'
-       DATABASE_NAME = 'patchwork'
-       DATABASE_USER = 'root'
-       DATABASE_PASSWORD = 'my_secret_root_password'
-       DATABSE_HOST = 'localhost'
-       DATABASE_PORT = ''
+        DATABASES = {
+            'default': {
+                'ENGINE': 'django.db.backends.mysql',
+                'HOST': 'localhost',
+                'PORT': '',
+                'USER': 'patchwork',
+                'PASSWORD': 'my_secret_password',
+                'NAME': 'patchwork',
+            },
+        }
 
 2. Django setup
 
 
 2. Django setup