Beispiel #1
0
 def __init__(self, initial_state=STATUS_ACTIVE, transaction_manager=zope_transaction.manager, keep_session=False):
     if initial_state == 'invalidated':
         initial_state = STATUS_CHANGED  # BBB
     SessionExtension.__init__(self)
     self.initial_state = initial_state
     self.transaction_manager = transaction_manager
     self.keep_session = keep_session
Beispiel #2
0
 def __init__(self,
              initial_state=STATUS_ACTIVE,
              transaction_manager=zope_transaction.manager):
     if initial_state == 'invalidated': initial_state = STATUS_CHANGED  #BBB
     SessionExtension.__init__(self)
     self.initial_state = initial_state
     self.transaction_manager = transaction_manager
 def __getattribute__(self, name):
     attrs = []
     for e in SessionExtension.__getattribute__(self, 'extensions'):
         attrs.append(getattr(e, name, None))
     attrs = filter(None, attrs)
     if not attrs:
         raise AttributeError(name)
     def wrapper(*args, **kwargs):
         for func in attrs:
             func(*args, **kwargs)
     wrapper.func_name = name
     return wrapper
Beispiel #4
0
 def __init__(self, initial_state=STATUS_ACTIVE):
     if initial_state=='invalidated': initial_state = STATUS_CHANGED #BBB
     SessionExtension.__init__(self)
     self.initial_state = initial_state