[dbapi] some documentation
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 27 Feb 2012 11:54:14 +0100
changeset 8274 aedb32d324ab
parent 8273 6c7cad317e60
child 8275 49e105e000ab
[dbapi] some documentation
dbapi.py
--- a/dbapi.py	Mon Feb 27 11:53:24 2012 +0100
+++ b/dbapi.py	Mon Feb 27 11:54:14 2012 +0100
@@ -280,13 +280,17 @@
 
     def __init__(self, vreg, session=None):
         super(DBAPIRequest, self).__init__(vreg)
+        #: 'language' => translation_function() mapping
+        self.translation = {}
         try:
             # no vreg or config which doesn't handle translations
             self.translations = vreg.config.translations
         except AttributeError:
-            self.translations = {}
+            pass
+        #: Request language identifier eg: 'en'
+        self.lang = None
         self.set_default_language(vreg)
-        # cache entities built during the request
+        #: cache entities built during the request
         self._eid_cache = {}
         if session is not None:
             self.set_session(session)