[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH 1/4] Adapt database config to Django 1.4
From: |
Thomas Petazzoni |
Subject: |
[Maposmatic-dev] [PATCH 1/4] Adapt database config to Django 1.4 |
Date: |
Wed, 18 Apr 2012 22:19:19 +0200 |
Django 1.4 no longer supports the old configuration style for the
database, and the new way has been available since Django 1.2, so
let's use the new way.
Signed-off-by: Thomas Petazzoni <address@hidden>
---
www/settings_local.py-template | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/www/settings_local.py-template b/www/settings_local.py-template
index f314851..db44d6d 100644
--- a/www/settings_local.py-template
+++ b/www/settings_local.py-template
@@ -31,12 +31,16 @@ ADMINS = (
('MapOSMatic admin', 'address@hidden'),
)
-DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = 'maposmatic' # Or path to database file if using
sqlite3.
-DATABASE_USER = 'maposmatic' # Not used with sqlite3.
-DATABASE_PASSWORD = 'ereiamjh' # Not used with sqlite3.
-DATABASE_HOST = 'localhost' # 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': 'maposmatic',
+ 'USER': 'maposmatic',
+ 'PASSWORD': 'ereiamjh',
+ 'HOST': 'localhost',
+ 'PORT': ''
+ }
+ }
# Path to ocitysmap's config file to use, or None for the default in ~/
OCITYSMAP_CFG_PATH = None
--
1.7.5.4
- [Maposmatic-dev] [PATCH 1/4] Adapt database config to Django 1.4,
Thomas Petazzoni <=
Re: [Maposmatic-dev] [PATCH 3/4] Adapt feeds url code to Django 1.4, Thomas Petazzoni, 2012/04/23
[Maposmatic-dev] [PATCH 4/4] Read the GIS database lag from a local file, Thomas Petazzoni, 2012/04/18