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:
parent
cbc7d257d4
commit
4c4b2d0f87
17 changed files with 502 additions and 181 deletions
|
@ -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.'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue