Commit e590b2ed authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

First running version.

parent e6fbe279
# coding: utf8
{
'%Y-%m-%d': '%Y-%m-%d',
'Birth Date': 'Birth Date',
'Category': 'Category',
'Code': 'Code',
'Collections': 'Collections',
'Controller': 'Controller',
'Cost': 'Cost',
'Definition': 'Definition',
'Demanded': 'Demanded',
'End Date': 'End Date',
'Executed': 'Executed',
'First Name': 'First Name',
'Forms': 'Forms',
'Grade': 'Grade',
'Hdr': 'Hdr',
'Hdr Date': 'Hdr Date',
'Host': 'Host',
'Id': 'Id',
'Initials': 'Initials',
'Last Name': 'Last Name',
'Level': 'Level',
'Line': 'Line',
'Max Records': 'Max Records',
'Model': 'Model',
'Name': 'Name',
'Note': 'Note',
'Notified': 'Notified',
'Organization': 'Organization',
'Percentage': 'Percentage',
'Person': 'Person',
'Phd': 'Phd',
'Phd Date': 'Phd Date',
'Project': 'Project',
'Ratio': 'Ratio',
'Select': 'Select',
'Start Date': 'Start Date',
'Store': 'Store',
'Tables': 'Tables',
'Team': 'Team',
......@@ -18,10 +43,18 @@
'Year': 'Year',
'Year End': 'Year End',
'Year Start': 'Year Start',
'budgets': 'budgets',
'careers': 'careers',
'categories': 'categories',
'enter a number between %(min)g and %(max)g': 'enter a number between %(min)g and %(max)g',
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
'hardware': 'hardware',
'harvesters': 'harvesters',
'levels': 'levels',
'organizations': 'organizations',
'people': 'people',
'projects': 'projects',
'responsabilities': 'responsabilities',
'teams': 'teams',
'undefined': 'undefined',
}
......@@ -57,7 +57,7 @@ db = DAL('sqlite://storage.sqlite', migrate=True)
#
#-------------------------------------------------------------------------------
db.define_table("categories",
Field("category", "string", notnull=True, unique=True),
Field("category", "string", notnull=True),
Field("grade", "string"),
Field("definition", "text"),
migrate="categories.table")
......@@ -95,7 +95,7 @@ db.define_table("teams",
#
#-------------------------------------------------------------------------------
db.define_table("budgets",
Field("id_people", db.persons, default=undef_id, label='Person'),
Field("id_people", db.people, default=undef_id, label='Person'),
Field("id_teams", db.teams, default=undef_id, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Project'),
Field("year", "integer", default=year, notnull=True),
......@@ -117,15 +117,15 @@ IS_IN_DB(db, 'projects.id', 'projects.project')
db.define_table("careers",
Field("id_people", db.persons, default=undef_id, label='Person'),
Field("id_people", db.people, default=undef_id, label='Person'),
Field("id_teams", db.teams, default=undef_id, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Project'),
Field("id_categories", db.categoriess, default=undef_id, label='Category'),
Field("id_categories", db.categories, default=undef_id, label='Category'),
Field("start_date", "date", default=today, notnull=True),
Field("end_date", "date"),
Field("percentage", "integer", default=100),
Field("note", "text"),
migrate="categories.table")
migrate="careers.table")
db.careers.id_people.requires = \
IS_IN_DB(db, 'people.id', 'people.last_name')
......@@ -136,9 +136,12 @@ IS_IN_DB(db, 'teams.id', 'teams.team')
db.careers.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
db.careers.id_categories.requires = \
IS_IN_DB(db, 'categories.id', 'categories.grade')
db.define_table("hardware",
Field("id_people", db.persons, default=undef_id, label='Person'),
Field("id_people", db.people, default=undef_id, label='Person'),
Field("id_teams", db.teams, default=undef_id, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Project'),
Field("model", "string"),
......@@ -160,7 +163,7 @@ IS_IN_DB(db, 'projects.id', 'projects.project')
db.define_table("responsabilities",
Field("id_people", db.persons, default=undef_id, label='Person'),
Field("id_people", db.people, default=undef_id, label='Person'),
Field("id_teams", db.teams, default=undef_id, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Project'),
Field("name", "string"),
......
......@@ -5,7 +5,9 @@
"""
if not db(db.categories.id).count():
db.categories.insert(id=undef_id, category=undef, definition=undef)
db.categories.insert(id=undef_id, category=undef,
grade=undef,
definition=undef)
if not db(db.levels.id).count():
db.levels.insert(id=undef_id, level=undef)
......
......@@ -31,4 +31,4 @@ if db(db.levels.id).count() == 1:
db.levels.insert(id=4, level='international')
if db(db.teams.id).count() == 1:
db.teams.insert(id=2, level='LHCb')
db.teams.insert(id=2, team='LHCb')
......@@ -31,7 +31,7 @@ gridNode.add_children(db.tables, func=configurator)
# The tool node of the navigation tree
#
toolNode = dbui.Node(T('Tools'))
toolNode.sort_children()
#toolNode.sort_children()
#
# The viewport with its navigation tree
......
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