[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH] Allows to have separate DBs for GIS OSM info an

From: David Decotigny
Subject: [Maposmatic-dev] [PATCH] Allows to have separate DBs for GIS OSM info and rendering DB.
Date: Sun, 6 Sep 2009 14:22:31 +0200

The assumption that the OSM postGIS DB was the same as the DB used for
the rendering (shared with maposmaticd) doesn't allow to run 2
instances of the maposmatic/maposmaticd engine (eg. a prod and a dev
instance). This patch allows this by differentiating both DB. This
makes it possible to share the same OSM db by both instances, but to
have separate rendering info.
 www/maposmatic/        |    2 +-
 www/ |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/www/maposmatic/ b/www/maposmatic/
index 1a25a87..8a15426 100644
--- a/www/maposmatic/
+++ b/www/maposmatic/
@@ -41,7 +41,7 @@ import www.settings
 def city_exists(city):
         conn = psycopg2.connect("dbname='%s' user='%s' host='%s' 
password='%s'" % \
-                                    (www.settings.DATABASE_NAME, 
+                                    (www.settings.GIS_DATABASE_NAME, 
     except psycopg2.OperationalError:
         return False
diff --git a/www/ b/www/
index 985d6c0..fd3febe 100644
--- a/www/
+++ b/www/
@@ -32,6 +32,7 @@ ADMINS = (
 DATABASE_ENGINE = 'postgresql_psycopg2'           # 'postgresql_psycopg2', 
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
 DATABASE_NAME = 'testdb'             # Or path to database file if using 
+GIS_DATABASE_NAME = 'testdb'             # Or path to PostGIS database file if 
using sqlite3.
 DATABASE_USER = 'test'             # Not used with sqlite3.
 DATABASE_PASSWORD = 'test'         # Not used with sqlite3.
 DATABASE_HOST = 'localhost'             # Set to empty string for localhost. 
Not used with sqlite3.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]