Commit 32d1c40b authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update the model to add the domains table.

parent d1a836e8
......@@ -94,6 +94,7 @@
'Documentations': 'Documentations',
'Domain': 'Domaine',
'Domaine': 'Domaine',
'domains': 'domaines',
'Duration': 'Durée',
'E-mail': 'E-mail',
'end': 'fin',
......
# -*- coding: utf-8 -*-
""" domains
"""
db.define_table("domains",
Field("domain", "string", length=255, notnull=True, unique=True),
migrate="domains.table")
db.domains._before_delete.append(INHIBIT_CASCADE_DELETE)
db.domains._before_delete.append(dbui.INHIBIT_DELETE_UNDEF)
db.domains._before_update.append(dbui.INHIBIT_UPDATE_UNDEF)
......@@ -4,7 +4,6 @@
"""
db.define_table("teams",
Field("team", "string", length=255, notnull=True, unique=True),
Field("domain", "string", length=255),
migrate="teams.table")
db.teams._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -4,6 +4,7 @@
"""
db.define_table("history",
Field("id_events", "reference events", default=undef_id, label='Event'),
Field("id_domains", "reference domains", default=undef_id, label='Domain'),
Field("id_teams", "reference teams", default=undef_id, label='Team'),
Field("id_projects", "reference projects", default=undef_id, label='Project'),
Field("id_fundings", "reference fundings", default=undef_id, label='Funding'),
......
# -*- coding: utf-8 -*-
""" teams
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('domains')
storeModifier.orderby(db.domains.domain)
\ No newline at end of file
......@@ -4,6 +4,10 @@
Insert defaults values in the tables
"""
if not db(db.domains.id).count():
db.domains.insert(id=undef_id,
domain=undef)
if not db(db.events.id).count():
db.events.insert(id=undef_id,
event=undef,
......
......@@ -78,6 +78,7 @@ cfgNode.add_child(T('the graphs'), to_grid('graphs'))
#
#-------------------------------------------------------------------------------
metaNode = Node(T('Metadata'))
metaNode.add_child(T('domains'), to_grid('domains'))
metaNode.add_child(T('fundings'), to_grid('fundings'))
metaNode.add_child(T('teams'), to_grid('teams'))
metaNode.add_child(T('projects'), to_grid('projects'))
......
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