Exemplo n.º 1
0
 def __init__(me, assoc_klas, *args, **kargs):
     setattr_from_kargs(
         me,
         kargs,
         assoc_base=Association,
         dbname=None,
         indexes=False,
         hidden=True,
     )
     _Relation.__init__(me, assoc_klas, *args, **kargs)
Exemplo n.º 2
0
 def __init__(me, *a, **ka):
     setattr_from_kargs( me, ka, remote_notifier = None)
     BasicController.__init__(me, *a, **ka)
     me.model = me.data_model_factory()
     data = [
         ExportFmt('pdf', 'Portable Document Format'),
         ExportFmt('ps',  'Adobe PostScript'),
         #ExportFmt('txt', 'Plain text'),
         #ExportFmt('bin', 'Raw binary dump (core)'),
     ]
     from reporter.common import use_excel
     if use_excel:
         data.insert(0,ExportFmt('xls', 'Excel Workbook'))
     me.model._format.SetData(data)
     me.model._format.refresh( current_choice = 0, as_index = True)
Exemplo n.º 3
0
 def __init__( me, item_klas, **kargs):
     assert item_klas
     me.klas = item_klas
     #assert cardinality in me._cardinality
     #me.cardinality = cardinality
     from svd_util.attr import setattr_from_kargs
     setattr_from_kargs( me, kargs,
         as_value= False,    #bool,
         lazy    = 'default' or bool or None,
         nullable= 'default' or bool,
         backref = None,     #name or dict( kargs) or None,
         own     = None,     #bool or None
         multiple= False,    #bool
     )
     assert not kargs
     if me.as_value: assert me.own
Exemplo n.º 4
0
 def __init__( me, assoc_klas, *args, **kargs ):
     setattr_from_kargs( me, kargs,
             assoc_base= Association, dbname =None, indexes =False, hidden =True,
         )
     _Relation.__init__( me, assoc_klas, *args, **kargs)