Commit 902d0340 authored by legac's avatar legac
Browse files

Simplify the model deploying the improved syntax for reference keys

(plugin_dbui 0.4.11.1).
parent e0991ac1
......@@ -2,14 +2,14 @@
"""
@auth.requires_login()
#@auth.requires_login()
def index():
if db.auth_user[auth.user_id]:
id_group = db.auth_membership(user_id=auth.user_id).group_id
session.role = db.auth_group(id=id_group).role
else:
return 'No users !!!!'
# if db.auth_user[auth.user_id]:
# id_group = db.auth_membership(user_id=auth.user_id).group_id
# session.role = db.auth_group(id=id_group).role
#
# else:
# return 'No users !!!!'
session.role = 'admin'
return LOAD('plugin_dbui', 'index', vars=request.vars)
......@@ -374,7 +374,7 @@
'Transform the talk into a proceeding': 'Transform the talk into a proceeding',
'Type': 'Type',
'Unable to send email': 'Unable to send email',
'undefined': 'undéfini',
'undefined': 'indéfini',
'universities': 'universités',
'Universities': 'Universitiés',
'University': 'Université',
......
......@@ -60,7 +60,4 @@ db.auth_membership.user_id.label = 'User'
db.auth_membership.group_id.label = 'Group'
db.auth_membership.user_id.requires = \
IS_IN_DB(db, 'auth_user.id', 'auth_user.last_name')
db.auth_membership.group_id.requires = \
IS_IN_DB(db, 'auth_group.id', 'auth_group.role')
IS_IN_DB(db, 'auth_user.last_name')
......@@ -150,8 +150,8 @@ db.define_table("publications",
Field("title", "text", notnull=True, comment=tp_title),
Field("first_author", "string", notnull=True, comment=tp_first_author),
Field("authors", "text", notnull=True, comment=tp_authors, requires=IS_LENGTH(65535)),
Field("id_collaborations", db.collaborations, default=undef_id, label="Collaboration"),
Field("id_publishers", db.publishers, default=undef_id, label="Publisher"),
Field("id_collaborations", "reference collaborations", default=undef_id, label="Collaboration"),
Field("id_publishers", "reference publishers", default=undef_id, label="Publisher"),
Field("year", "integer", notnull=True, requires=IS_INT_IN_RANGE(1900, year+1)),
Field("volume", "string", comment=tp_volume),
Field("pages", "string", comment=tp_pages),
......@@ -162,10 +162,10 @@ db.define_table("publications",
Field("conference_url", "string", label='url', requires=IS_EMPTY_OR(IS_URL()), comment=tp_conference_url),
Field("conference_dates", "string", label='Dates', comment=tp_conference_dates),
Field("conference_town", "string", label='Town'),
Field("id_countries", db.countries, default=undef_id, label='Country'),
Field("id_countries", "reference countries", default=undef_id, label='Country'),
Field("conference_speaker", "string", label='Speaker', comment=tp_speaker),
Field("report_numbers", "string", comment=tp_report_numbers, label="Number(s)"),
Field("id_reports", db.reports, default=undef_id, label="Type"),
Field("id_reports", "reference reports", default=undef_id, label="Type"),
Field("universities", "string", comment=tp_universities),
Field("directors", "string", comment=tp_directors),
Field("defense", "string", comment=tp_defense),
......@@ -173,39 +173,15 @@ db.define_table("publications",
Field("book_issn", "string", label="ISSN"),
Field("book_chapters", "string", label="Chapter(s)"),
Field("authors_cppm", "text", notnull=True, label="Authors", comment=tp_authors_cppm),
Field("id_authors_roles", db.authors_roles, default=undef_id, label="Role"),
Field("id_teams", db.teams, notnull=True, label='Team'),
Field("id_projects", db.projects, notnull=True, label='Project'),
Field("id_categories", db.categories, default=undef_id, label='Category'),
Field("id_status", db.status, default=undef_id, label="Status"),
Field("id_authors_roles", "reference authors_roles", default=undef_id, label="Role"),
Field("id_teams", "reference teams", notnull=True, label='Team'),
Field("id_projects", "reference projects", notnull=True, label='Project'),
Field("id_categories", "reference categories", default=undef_id, label='Category'),
Field("id_status", "reference status", default=undef_id, label="Status"),
migrate="publications.table")
db.publications.id_authors_roles.requires = \
IS_IN_DB(db, 'authors_roles.id', 'authors_roles.role')
db.publications.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
db.publications.id_collaborations.requires = \
IS_IN_DB(db, 'collaborations.id', 'collaborations.collaboration')
db.publications.id_countries.requires = \
IS_IN_DB(db, 'countries.id', 'countries.country')
db.publications.id_publishers.requires = \
IS_IN_DB(db, 'publishers.id', 'publishers.abbreviation')
db.publications.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
db.publications.id_reports.requires = \
IS_IN_DB(db, 'reports.id', 'reports.type')
db.publications.id_status.requires = \
IS_IN_DB(db, 'status.id', 'status.code')
db.publications.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
IS_IN_DB(db, 'publishers.abbreviation')
db.publications.submitted.requires = IS_MATCH('^\d{4}(-\d{2})?(-\d{2})?$')
db.publications.volume.requires = IS_EMPTY_OR(IS_MATCH('^\d+(-\d+)?$'))
\ No newline at end of file
......@@ -27,24 +27,15 @@ T("The name of the web2py controller to run a search: articles, proceedings,..."
db.define_table("controllers",
Field("controller", "string", notnull=True, comment=tp_controller),
Field("id_categories", db.categories, default=undef_id, label='Category', comment=tp_category),
Field("id_categories", "reference categories", default=undef_id, label='Category', comment=tp_category),
migrate="controllers.table")
db.controllers.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
# relation between teams and projects
db.define_table("organisation",
Field("id_teams", db.teams, default=undef_id, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Project'),
Field("id_teams", "reference teams", default=undef_id, label='Team'),
Field("id_projects", "reference projects", default=undef_id, label='Project'),
migrate="organisation.table")
db.organisation.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
db.organisation.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
#-------------------------------------------------------------------------------
#
# harvesters tool
......@@ -55,20 +46,12 @@ T("List of authors belonging to CPPM, separated by comma: P.-Y. Doe, J. Smith")
db.define_table("cppm_authors",
Field("year", "integer", notnull=True, default=year,),
Field("id_teams", db.teams, notnull=True, label='Team'),
Field("id_projects", db.projects, notnull=True, label='Project'),
Field("id_teams", "reference teams", notnull=True, label='Team'),
Field("id_projects", "reference projects", notnull=True, label='Project'),
Field("authors", "text", notnull=True, comment=tp_authors_cppm),
migrate="cppm_authors.table")
db.cppm_authors.year.requires = \
IS_INT_IN_RANGE(1900, year+1)
db.cppm_authors.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
db.cppm_authors.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
db.cppm_authors.year.requires = IS_INT_IN_RANGE(1900, year+1)
tp_collections = \
T("List of collections separated by commma: LHCb Papers, LHCb Talks")
......@@ -80,29 +63,17 @@ tp_ratio = \
T("Parameter for fuzzy string search.")
db.define_table("harvesters",
Field("id_teams", db.teams, notnull=True, label='Team'),
Field("id_projects", db.projects, notnull=True, label='Project'),
Field("id_teams", "reference teams", notnull=True, label='Team'),
Field("id_projects", "reference projects", notnull=True, label='Project'),
Field("controller", "string", notnull=True, comment=tp_controller, label='Harvest'),
Field("host", "string", notnull=True, default='cdsweb.cern.ch', label='Store', comment=tp_host),
Field("collections", "string", comment=tp_collections),
Field("ratio", "double", notnull=True, default=1.0, comment=tp_ratio),
Field("id_categories", db.categories, default=undef_id, label='Category', comment=tp_category),
Field("id_categories", "reference categories", default=undef_id, label='Category', comment=tp_category),
migrate="harvesters.table")
db.harvesters.controller.requires = \
IS_IN_DB(db, 'controllers.controller')
db.harvesters.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
db.harvesters.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
db.harvesters.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
db.harvesters.ratio.requires = \
IS_FLOAT_IN_RANGE(0., 1.0)
db.harvesters.controller.requires = IS_IN_DB(db, 'controllers.controller')
db.harvesters.ratio.requires = IS_FLOAT_IN_RANGE(0., 1.0)
#-------------------------------------------------------------------------------
#
......@@ -194,7 +165,7 @@ T("Sort the publications list associated to the section according to the "
db.define_table("sections",
Field("section", "string", notnull=True, comment=tp_section),
Field("id_renderers", db.renderers, notnull=True, label='Render'),
Field("id_renderers", "reference renderers", notnull=True, label='Render'),
Field("category_codes", "text", comment=tp_categories),
Field("conditions", "text", comment=tp_conditions),
Field("sort_field", "string", comment=tp_sort_field),
......@@ -202,9 +173,6 @@ db.define_table("sections",
Field("definition", "text"),
migrate="sections.table")
db.sections.id_renderers.requires = \
IS_IN_DB(db, 'renderers.id', 'renderers.renderer')
#-------------------------------------------------------------------------------
#
# metrics tool
......
......@@ -4,29 +4,29 @@
Insert defaults values in the tables
"""
if not db(db.authors_roles.id).count():
if not db(db.authors_roles).count():
db.authors_roles.insert(id=undef_id, role=undef, definition=undef)
if not db(db.categories.id).count():
if not db(db.categories).count():
db.categories.insert(id=undef_id, code=undef, definition=undef)
if not db(db.collaborations.id).count():
if not db(db.collaborations).count():
db.collaborations.insert(id=undef_id, collaboration=undef)
if not db(db.countries.id).count():
if not db(db.countries).count():
db.countries.insert(id=undef_id, country=undef)
if not db(db.projects.id).count():
if not db(db.projects).count():
db.projects.insert(id=undef_id, project=undef, agencies=undef)
if not db(db.publishers.id).count():
if not db(db.publishers).count():
db.publishers.insert(id=undef_id, publisher=undef, abbreviation=undef)
if not db(db.reports.id).count():
if not db(db.reports).count():
db.reports.insert(id=undef_id, type=undef)
if not db(db.status.id).count():
if not db(db.status).count():
db.status.insert(id=undef_id, code=undef, definition=undef)
if not db(db.teams.id).count():
if not db(db.teams).count():
db.teams.insert(id=undef_id, team=undef, domain=undef)
......@@ -14,7 +14,7 @@
#
# categories
#
if db(db.categories.id).count() == 1:
if db(db.categories).count() == 1:
db.categories.insert(id=2,
code='ACL',
......@@ -104,7 +104,7 @@ if db(db.categories.id).count() == 1:
#
# projecs
#
if db(db.projects.id).count() == 1:
if db(db.projects).count() == 1:
db.projects.insert(id=2, project='ATLAS', agencies='CNRS/IN2P3')
db.projects.insert(id=3, project='ANTARES', agencies='CNRS/IN2P3')
db.projects.insert(id=4, project='CTA', agencies='CNRS/IN2P3')
......@@ -120,7 +120,7 @@ if db(db.projects.id).count() == 1:
#
# teams
#
if db(db.teams.id).count() == 1:
if db(db.teams).count() == 1:
db.teams.insert(id=2, team='Astronomie neutrino et gamma', domain='Astroparticules')
db.teams.insert(id=3, team='ATLAS', domain='Physique des particules')
db.teams.insert(id=4, team='D0', domain='Physique des particules')
......@@ -133,7 +133,7 @@ if db(db.teams.id).count() == 1:
#
# status
#
if db(db.status.id).count() == 1:
if db(db.status).count() == 1:
db.status.insert(id=2, code=dbui.UNKNOWN,
definition="Un champ important n'est pas défini. A vérifier.")
db.status.insert(id=3, code='OK', definition='Cette entrée a été vérifiée.')
......@@ -146,7 +146,7 @@ if db(db.status.id).count() == 1:
#
# axes (axis/granularity)
#
if db(db.axes.id).count() == 0:
if db(db.axes).count() == 0:
db.axes.insert(axis='projects', granularity='project')
db.axes.insert(axis='projects', granularity='agency')
db.axes.insert(axis='teams', granularity='team')
......@@ -156,7 +156,7 @@ if db(db.axes.id).count() == 0:
#
# harvester controller (controller/category)
#
if db(db.controllers.id).count() == 0:
if db(db.controllers).count() == 0:
db.controllers.insert(controller='articles', id_categories=2)
db.controllers.insert(controller='articles', id_categories=3)
db.controllers.insert(controller='notes', id_categories=14)
......@@ -171,7 +171,7 @@ if db(db.controllers.id).count() == 0:
#
# organisation (team/project)
#
if db(db.organisation.id).count() == 0:
if db(db.organisation).count() == 0:
db.organisation.insert(id_teams=1, id_projects=1)
db.organisation.insert(id_teams=2, id_projects=3)
db.organisation.insert(id_teams=2, id_projects=4)
......@@ -193,7 +193,7 @@ if db(db.organisation.id).count() == 0:
#
# cppm authors
#
if db(db.cppm_authors.id).count() == 0:
if db(db.cppm_authors).count() == 0:
db.cppm_authors.insert(id=1, year=1998, id_teams=7, id_projects=8, authors="E. Aslanides, B. Dinkespiler, R. Le Gac, M. Menouni, A. Tsaregorodtsev")
db.cppm_authors.insert(id=2, year=1999, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, B. Dinkespiler, R. Le Gac, O. Leroy, M. Menouni, A. Tsaregorodtsev")
db.cppm_authors.insert(id=3, year=2000, id_teams=7, id_projects=8, authors="E. Aslanides, J.-P. Cachemiche, T. Da silva, R. Le Gac, O. Leroy, P.-L. Liotard, M. Menouni, A. Tsaregorodtsev, B. Viaud")
......@@ -213,7 +213,7 @@ if db(db.cppm_authors.id).count() == 0:
#
# Harvester configuration
#
if db(db.harvesters.id).count() == 0:
if db(db.harvesters).count() == 0:
# ATLAS
db.harvesters.insert(id_teams=3,
......@@ -370,7 +370,7 @@ if db(db.harvesters.id).count() == 0:
#
# lists defintion
#
if db(db.lists.id).count() == 0:
if db(db.lists).count() == 0:
db.lists.insert(id=2,
list='cat. usuelle / équipe / année',
sections="Preprints, Articles, Actes de conférence, "
......@@ -402,7 +402,7 @@ if db(db.lists.id).count() == 0:
#
# renderers definition
#
if db(db.renderers.id).count() == 0:
if db(db.renderers).count() == 0:
db.renderers.insert(id=2,
renderer='Article',
template="{publications.title}, {publications.first_author} "
......@@ -453,7 +453,7 @@ if db(db.renderers.id).count() == 0:
#
# section defintion
#
if db(db.sections.id).count() == 0:
if db(db.sections).count() == 0:
db.sections.insert(id=1,
section='Articles',
id_renderers=2,
......
......@@ -20,10 +20,10 @@ virtdb = DAL(None)
# Author extractor
#
tp_authors = \
T("String containing the author names with their institutes number.")
T('String containing the author names with their institutes number.')
tp_affiliation = \
T("Institute number associated to CPPM authors")
T('Institute number associated to CPPM authors')
virtdb.define_table('authors_selector',
Field('authors', 'text', comment=tp_authors, requires=IS_LENGTH(65535)),
......@@ -34,19 +34,14 @@ virtdb.define_table('authors_selector',
#
virtdb.define_table('check_selector',
Field('year', 'integer', default=year),
Field('id_teams', db.teams, label='Team'),
Field('id_projects', db.projects, label='Project'),
Field('id_categories', db.categories, label='Category'),
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('id_categories', 'reference categories', label='Category'),
Field('mode', 'string', default=MODE_DRY_RUN))
virtdb.check_selector.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
virtdb.check_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
virtdb.check_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
virtdb.check_selector.id_categories.requires = IS_IN_DB(db, 'categories.code')
virtdb.check_selector.id_projects.requires = IS_IN_DB(db, 'projects.project')
virtdb.check_selector.id_teams.requires = IS_IN_DB(db, 'teams.team')
virtdb.check_selector.mode.requires = \
IS_IN_SET([MODE_DRY_RUN, MODE_CHANGE_STATUS])
......@@ -59,29 +54,28 @@ stores = ['cdsweb.cern.ch', 'inspirehep.net']
virtdb.define_table('free_harvester_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field("id_teams", db.teams, label='Team'),
Field("id_projects", db.projects, label='Project'),
Field("host", "string", notnull=True, default=stores[1], label='Store'),
Field("collections", "string", default="find ..."),
Field("ratio", "double", notnull=True, default=1.0),
Field("controller", "string", notnull=True, label='Harvest'),
Field("id_categories", db.categories, label='Category'),
Field("mode", "string", default=MODE_DRY_RUN))
virtdb.free_harvester_selector.host.requires = \
IS_IN_SET(stores)
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('host', 'string', notnull=True, default=stores[1], label='Store'),
Field('collections', 'string', default="find ..."),
Field('ratio', 'double', notnull=True, default=1.0),
Field('controller', 'string', notnull=True, label='Harvest'),
Field('id_categories', 'reference categories', label='Category'),
Field('mode', 'string', default=MODE_DRY_RUN))
virtdb.free_harvester_selector.host.requires = IS_IN_SET(stores)
virtdb.free_harvester_selector.mode.requires = \
IS_IN_SET([MODE_DRY_RUN, MODE_LOAD_IN_DB])
virtdb.free_harvester_selector.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
IS_IN_DB(db, 'categories.code')
virtdb.free_harvester_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
IS_IN_DB(db, 'projects.project')
virtdb.free_harvester_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
IS_IN_DB(db, 'teams.team')
#
# harvester selector
......@@ -89,16 +83,16 @@ IS_IN_DB(db, 'teams.id', 'teams.team')
virtdb.define_table('harvester_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, label='Team'),
Field('id_projects', db.projects, label='Project'),
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('controller', 'string', label='Harvest'),
Field("mode", "string", default=MODE_LOAD_IN_DB))
Field('mode', 'string', default=MODE_LOAD_IN_DB))
virtdb.harvester_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
IS_IN_DB(db, 'projects.project')
virtdb.harvester_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
IS_IN_DB(db, 'teams.team')
virtdb.harvester_selector.mode.requires = \
IS_IN_SET([MODE_DRY_RUN, MODE_LOAD_IN_DB])
......@@ -109,25 +103,17 @@ IS_IN_SET([MODE_DRY_RUN, MODE_LOAD_IN_DB])
virtdb.define_table('list_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, label='Team'),
Field('id_projects', db.projects, label='Project'),
Field('id_categories', db.categories, label='Category'),
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('id_categories', 'reference categories', label='Category'),
Field('author', 'string'),
Field('id_lists', db.lists, label="List"),
Field('id_lists', 'reference lists', label='List'),
Field('format', 'string', default='html'))
virtdb.list_selector.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
virtdb.list_selector.id_lists.requires = \
IS_IN_DB(db, 'lists.id', 'lists.list')
virtdb.list_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
virtdb.list_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
virtdb.list_selector.id_categories.requires = IS_IN_DB(db, 'categories.code')
virtdb.list_selector.id_lists.requires = IS_IN_DB(db, 'lists.list')
virtdb.list_selector.id_projects.requires = IS_IN_DB(db, 'projects.project')
virtdb.list_selector.id_teams.requires = IS_IN_DB(db, 'teams.team')
virtdb.list_selector.format.requires = IS_IN_SET(['html', 'tex', 'pdf'])
#
......@@ -137,12 +123,12 @@ tp_xml = T('The XML string describing the MARC12 record. '
'It Starts with "<?xml" and ends with "</collection>"')
virtdb.define_table('marc12_selector',
Field('id_teams', db.teams, label='Team'),
Field('id_projects', db.projects, label='Project'),
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('xml', 'text', comment=tp_xml, label='MARCXML'),
Field('controller', 'string', label='Process as'),
Field('id_categories', db.categories, label='Category'),
Field("mode", "string", default=MODE_DRY_RUN))
Field('id_categories', 'reference categories', label='Category'),
Field('mode', 'string', default=MODE_DRY_RUN))
virtdb.marc12_selector.controller.requires = IS_IN_SET(['articles',
......@@ -153,18 +139,10 @@ virtdb.marc12_selector.controller.requires = IS_IN_SET(['articles',
'talks',
'theses'])
virtdb.marc12_selector.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.code')
virtdb.marc12_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
virtdb.marc12_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
virtdb.marc12_selector.mode.requires = \
IS_IN_SET([MODE_DRY_RUN, MODE_LOAD_IN_DB])
virtdb.marc12_selector.id_categories.requires = IS_IN_DB(db, 'categories.code')
virtdb.marc12_selector.id_projects.requires = IS_IN_DB(db, 'projects.project')
virtdb.marc12_selector.id_teams.requires = IS_IN_DB(db, 'teams.team')
virtdb.marc12_selector.mode.requires = IS_IN_SET([MODE_DRY_RUN, MODE_LOAD_IN_DB])
virtdb.marc12_selector.xml.requires = IS_MATCH('<\?xml*')
#
......@@ -173,20 +151,14 @@ virtdb.marc12_selector.xml.requires = IS_MATCH('<\?xml*')
virtdb.define_table('metric_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, label='Team'),
Field('id_projects', db.projects, label='Project'),
Field('id_metrics', db.metrics, label="Metric"),
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('id_metrics', 'reference metrics', label='Metric'),
Field('format', 'string', default='html'))
virtdb.metric_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
virtdb.metric_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
virtdb.metric_selector.id_metrics.requires = \
IS_IN_DB(db, 'metrics.id', 'metrics.metric')
virtdb.metric_selector.id_projects.requires = IS_IN_DB(db, 'projects.project')
virtdb.metric_selector.id_teams.requires = IS_IN_DB(db, 'teams.team')
virtdb.metric_selector.id_metrics.requires = IS_IN_DB(db, 'metrics.metric')
virtdb.metric_selector.format.requires = IS_IN_SET(['html', 'csv'])
#
......@@ -195,15 +167,15 @@ virtdb.metric_selector.format.requires = IS_IN_SET(['html', 'csv'])
virtdb.define_table('run_all_harvesters_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, label='Team'),
Field('id_projects', db.projects, label='Project'),
Field("mode", "string", default=MODE_LOAD_IN_DB))
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('mode', 'string', default=MODE_LOAD_IN_DB))
virtdb.run_all_harvesters_selector.mode.requires = \
IS_IN_SET([MODE_DRY_RUN, MODE_LOAD_IN_DB])
virtdb.run_all_harvesters_selector.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
IS_IN_DB(db, 'projects.project')
virtdb.run_all_harvesters_selector.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
IS_IN_DB(db, 'teams.team')
......@@ -62,6 +62,6 @@
<a href="http://www.cecill.info/" target="_blank">CeCILL</a>.</p>
<br>
<p class="my-p">&copy; 2010 - 2012 Renaud Le Gac</p>
<p class="my-p">&copy; 2010 - 2013 Renaud Le Gac</p>
</body>
</html>
\ No newline at end of file
--------------------------------- CHANGELOG ----------------------------------
HEAD
- Migrate to plugin_dbui 0.4.11.1
- Bug fixed and polish the user interface.
- Add constant to deal with migrate flag and roles.
- Consolidate the authentification procedure.
......
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