equal
deleted
inserted
replaced
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 = {} |