Commit 78888e75 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Migrate to dbui 0.6.1.0 (lazy_tables, about, documentation, versions).

parent aebe396c
""" Main Controller to run the application with the user privileges.
"""
import os
import plugin_dbui as dbui
def about():
fn = os.path.join("applications",
request.application,
"static",
"ABOUT.html")
return open(fn, 'rb').read()
def documentations():
di = {}
di["epydoc_dbui"] = URL('static', 'plugin_dbui/docs/epydoc/index.html')
di["epydoc_track_publication"] = URL('static', 'docs/epydoc/index.html')
di["js_mathjax"] = URL('static', 'plugin_mathjax/docs/html/index.html')
di["jsduck_dbui"] = URL('static', 'plugin_dbui/docs/jsduck/index.html')
di["png_db"] = URL('static', 'docs/database.png')
return di
def index():
session.role = ''
......@@ -48,7 +25,3 @@ def user():
to decorate functions that need access control
"""
return dict(form=auth())
def versions():
return dbui.get_versions()
......@@ -202,6 +202,7 @@
'insert MARCXML': 'insérer MARCXML',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'install': 'installé',
'Institute': 'Institut',
'Institute number associated to CPPM authors': "Numéro de l'Institut associé aux auteurs du CPPM",
"Invalid database table '%s'": "Invalid database table '%s'",
......
......@@ -17,7 +17,7 @@ ID_USER, USER, DEF_USER = 2, 'user', 'liaisons, team leaders,...'
#
#-------------------------------------------------------------------------------
try:
db = DAL(DB_MYSQL, migrate_enabled=MIGRATE, pool_size=10)
db = DAL(DB_MYSQL, lazy_tables=True, migrate_enabled=MIGRATE, pool_size=10)
except:
raise HTTP(500, T("Can't access the MySQL database !!!"))
......@@ -26,7 +26,7 @@ except:
# SQLITE database (test)
#
#-------------------------------------------------------------------------------
# db = DAL('sqlite://storage.sqlite', migrate_enabled=MIGRATE)
# db = DAL('sqlite://storage.sqlite', lazy_tables=True, migrate_enabled=MIGRATE)
#-------------------------------------------------------------------------------
#
......
......@@ -108,10 +108,9 @@ if session.role in (ADMIN, USER):
# HELP NODE
#
#-------------------------------------------------------------------------------
aboutLeaf = Panel(autoLoad=URL('default', 'about'), autoScroll=True)
documentationsLeaf = Panel(autoLoad=URL('default', 'documentations'), autoScroll=True)
schemaLeaf = Panel(autoLoad=URL('default', 'schema'), autoScroll=True)
versionLeaf = Panel(autoLoad=URL('default', 'versions'))
aboutLeaf = Panel(autoLoad=URL('plugin_dbui', 'about'), autoScroll=True)
documentationsLeaf = Panel(autoLoad=URL('plugin_dbui', 'documentations'), autoScroll=True)
versionLeaf = Panel(autoLoad=URL('plugin_dbui', 'versions'))
helpNode = Node(T('Help'))
helpNode.add_child(T('about'), aboutLeaf)
......
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