Antony Lesuisse (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-template-postgres-al into 
lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-template-postgres-al/+merge/92376

use postgres instead of template1 and template1 instead of template0
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-template-postgres-al/+merge/92376
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-template-postgres-al.
=== modified file 'openerp/service/web_services.py'
--- openerp/service/web_services.py	2012-02-08 10:59:13 +0000
+++ openerp/service/web_services.py	2012-02-09 21:39:18 +0000
@@ -117,7 +117,7 @@
         return fn(*params)
 
     def _create_empty_database(self, name):
-        db = sql_db.db_connect('template1')
+        db = sql_db.db_connect('postgres')
         cr = db.cursor()
         chosen_template = tools.config['db_template']
         try:
@@ -176,7 +176,7 @@
         openerp.modules.registry.RegistryManager.delete(db_name)
         sql_db.close_db(db_name)
 
-        db = sql_db.db_connect('template1')
+        db = sql_db.db_connect('postgres')
         cr = db.cursor()
         cr.autocommit(True) # avoid transaction block
         try:
@@ -278,7 +278,7 @@
         openerp.modules.registry.RegistryManager.delete(old_name)
         sql_db.close_db(old_name)
 
-        db = sql_db.db_connect('template1')
+        db = sql_db.db_connect('postgres')
         cr = db.cursor()
         cr.autocommit(True) # avoid transaction block
         try:
@@ -306,7 +306,7 @@
             raise openerp.exceptions.AccessDenied()
         chosen_template = tools.config['db_template']
         templates_list = tuple(set(['template0', 'template1', 'postgres', chosen_template]))
-        db = sql_db.db_connect('template1')
+        db = sql_db.db_connect('postgres')
         cr = db.cursor()
         try:
             try:
@@ -544,7 +544,7 @@
         return http_server.list_http_services()
 
     def exp_check_connectivity(self):
-        return bool(sql_db.db_connect('template1'))
+        return bool(sql_db.db_connect('postgres'))
 
     def exp_get_os_time(self):
         return os.times()

=== modified file 'openerp/tools/config.py'
--- openerp/tools/config.py	2012-02-06 23:02:15 +0000
+++ openerp/tools/config.py	2012-02-09 21:39:18 +0000
@@ -223,7 +223,7 @@
                          help="specify the database port", type="int")
         group.add_option("--db_maxconn", dest="db_maxconn", type='int', my_default=64,
                          help="specify the the maximum number of physical connections to posgresql")
-        group.add_option("--db-template", dest="db_template", my_default="template0",
+        group.add_option("--db-template", dest="db_template", my_default="template1",
                          help="specify a custom database template to create a new database")
         parser.add_option_group(group)
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to