cwvreg.py
changeset 169 0e031b66cb0b
parent 0 b97547f5f1fa
child 213 6842c3dee34b
equal deleted inserted replaced
168:f6be0c92fc38 169:0e031b66cb0b
    25 
    25 
    26 
    26 
    27 class CubicWebRegistry(VRegistry):
    27 class CubicWebRegistry(VRegistry):
    28     """extend the generic VRegistry with some cubicweb specific stuff"""
    28     """extend the generic VRegistry with some cubicweb specific stuff"""
    29     
    29     
    30     def __init__(self, config, debug=None):
    30     def __init__(self, config, debug=None, initlog=True):
    31         # first init log service
    31         if initlog:
    32         config.init_log(debug=debug)
    32             # first init log service
       
    33             config.init_log(debug=debug)
    33         super(CubicWebRegistry, self).__init__(config)
    34         super(CubicWebRegistry, self).__init__(config)
    34         self.schema = None
    35         self.schema = None
    35         self.reset()
    36         self.reset()
    36         self.initialized = False
    37         self.initialized = False
    37         
    38         
   340     @cached
   341     @cached
   341     def rqlhelper(self):
   342     def rqlhelper(self):
   342         return RQLHelper(self.schema,
   343         return RQLHelper(self.schema,
   343                          special_relations={'eid': 'uid', 'has_text': 'fti'})
   344                          special_relations={'eid': 'uid', 'has_text': 'fti'})
   344 
   345 
       
   346 
   345 class MulCnxCubicWebRegistry(CubicWebRegistry):
   347 class MulCnxCubicWebRegistry(CubicWebRegistry):
   346     """special registry to be used when an application has to deal with
   348     """special registry to be used when an application has to deal with
   347     connections to differents repository. This class add some additional wrapper
   349     connections to differents repository. This class add some additional wrapper
   348     trying to hide buggy class attributes since classes are not designed to be
   350     trying to hide buggy class attributes since classes are not designed to be
   349     shared.
   351     shared.