dbapi.py
changeset 8404 3dcb117fb3b0
parent 8367 fc59d2380c48
child 8537 e30d0a7f0087
child 8571 7e5246889148
equal deleted inserted replaced
8401:a9efb25337da 8404:3dcb117fb3b0
   285 class DBAPIRequest(RequestSessionBase):
   285 class DBAPIRequest(RequestSessionBase):
   286 
   286 
   287     def __init__(self, vreg, session=None):
   287     def __init__(self, vreg, session=None):
   288         super(DBAPIRequest, self).__init__(vreg)
   288         super(DBAPIRequest, self).__init__(vreg)
   289         #: 'language' => translation_function() mapping
   289         #: 'language' => translation_function() mapping
   290         self.translation = {}
       
   291         try:
   290         try:
   292             # no vreg or config which doesn't handle translations
   291             # no vreg or config which doesn't handle translations
   293             self.translations = vreg.config.translations
   292             self.translations = vreg.config.translations
   294         except AttributeError:
   293         except AttributeError:
   295             pass
   294             self.translations = {}
   296         #: Request language identifier eg: 'en'
   295         #: Request language identifier eg: 'en'
   297         self.lang = None
   296         self.lang = None
   298         self.set_default_language(vreg)
   297         self.set_default_language(vreg)
   299         #: cache entities built during the request
   298         #: cache entities built during the request
   300         self._eid_cache = {}
   299         self._eid_cache = {}