Commit 6a46bdd2 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add the local file _db.py in the model.

parent d001c4a0
......@@ -5,11 +5,13 @@
.pydevproject
*.table
.settings/
_db.py
cache/
cron/
databases
databases*/
errors/
latex/
private/
sessions/
uploads/
......
# -*- coding: utf-8 -*-
""" access
setup the connection to the databases.
Define constants for the different role
Define constants for the different role.
Access to the databases.
"""
# Production at CPPM
DB_HOST = 'maretude.in2p3.fr'
DB_USER = 'GesProd'
DB_PWD = 'Prod_CPPM'
DATABASE = 'GesProd'
# Test database
# DB_HOST = 'localhost'
# DB_USER = 'GesProd'
# DB_PWD = 'Prod_CPPM'
# DATABASE = 'test_publications'
# Migration flags
MIGRATE = False
MIGRATE_USER = False
......@@ -25,20 +13,12 @@ MIGRATE_USER = False
ID_ADMIN, ADMIN, DEF_ADMIN = 1, 'admin', 'administrators, librairians,...'
ID_USER, USER, DEF_USER = 2, 'user', 'liaisons, team leaders,...'
#-------------------------------------------------------------------------------
#
# MYSQL database
#
#-------------------------------------------------------------------------------
try:
mysql = 'mysql://%s:%s@%s/%s' % (DB_USER, DB_PWD, DB_HOST, DATABASE)
db = DAL(mysql, lazy_tables=False, migrate_enabled=MIGRATE, pool_size=10)
except:
raise HTTP(500, T("Can't access the MySQL database !!!"))
#-------------------------------------------------------------------------------
#
# virtual database
#
#-------------------------------------------------------------------------------
virtdb = DAL(None)
--------------------------------- CHANGELOG ----------------------------------
HEAD
- Database(s) connection parameters are moved in the local file _db.py
0.8.8.1 (Dec 2014)
- Require plugin_dbui 0.6.1.14 or later version.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment