Ignore:
Timestamp:
Jun 2, 2008, 11:25:47 PM (16 years ago)
Author:
ecprice
Message:

Put validation behind more abstraction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/webcommon.py

    r554 r572  
    3737    return property(getter)
    3838
    39 class Global(object):
    40     """Global state of the system, to avoid duplicate remctls to get state"""
     39class State(object):
     40    """State for a request"""
    4141    def __init__(self, user):
    42         self.user = user
     42        self.username = user
    4343
    4444    machines = cachedproperty(lambda self:
    45                                   Machine.query().join('acl').select_by(user=self.user))
     45                                  Machine.query().join('acl').select_by(user=self.username))
    4646    xmlist_raw = cachedproperty(lambda self: controls.getList())
    4747    xmlist = cachedproperty(lambda self:
     
    5656                delattr(self, attr)
    5757
    58 g = Global(None)
     58state = State(None)
Note: See TracChangeset for help on using the changeset viewer.