access.py 548 Bytes
Newer Older
1 2
# -*- coding: utf-8 -*-
""" access
3

4 5 6
    setup the connection to the databases
    
"""
7
DB_MYSQL = 'mysql://GesProd:Prod_CPPM@maretude.in2p3.fr/GesProd'
8 9
MIGRATE = False

10 11
ID_ADMIN, ADMIN, DEF_ADMIN = 1, 'admin', 'administrators, librairians,...'
ID_USER, USER, DEF_USER = 2, 'user', 'liaisons, team leaders,...'
12 13

#
14
# connect to the database
15
#
16 17 18 19
# try:
#     db = DAL(DB_MYSQL, migrate_enabled=MIGRATE, pool_size=10)
# except:
#     raise HTTP(500, T("Can't access the MySQL database !!!"))
20

21
db = DAL('sqlite://storage.sqlite', migrate_enabled=MIGRATE)