Added a new feature allowing to create objects by importing them from external sources instead of from filling a web form.

This commit is contained in:
Gaetan Delannay 2009-10-20 16:57:00 +02:00
parent cbc7d257d4
commit 4c4b2d0f87
17 changed files with 502 additions and 181 deletions

View file

@ -8,11 +8,25 @@ r, w, d = ('read', 'write', 'delete')
# Descriptor classes used for refining descriptions of elements in types
# (pages, groups,...) ----------------------------------------------------------
class Page:
'''Used for describing a page, its related phase, show condition, etc.'''
def __init__(self, name, phase='main', show=True):
self.name = name
self.phase = phase
self.show = show
class Import:
'''Used for describing the place where to find the data to use for creating
an object.'''
def __init__(self, path, columnMethod=None, columnHeaders=(),
sortMethod=None):
self.id = 'import'
self.path = path
self.columnMethod = columnMethod
# This method allows to split every element into subElements that can
# be shown as column values in a table.
self.columnHeaders = columnHeaders
self.sortMethod = sortMethod
# ------------------------------------------------------------------------------
class Type:
'''Basic abstract class for defining any appy type.'''