req.py
changeset 9821 2077c8da1893
parent 9818 e3d2012adcd0
parent 9770 112c884b2d8d
child 10256 f753f364550f
--- a/req.py	Fri May 23 18:35:13 2014 +0200
+++ b/req.py	Fri Jun 27 11:48:26 2014 +0200
@@ -207,7 +207,7 @@
         """
         parts = ['Any X WHERE X is %s' % etype]
         varmaker = rqlvar_maker(defined='X')
-        eschema = self.vreg.schema[etype]
+        eschema = self.vreg.schema.eschema(etype)
         for attr, value in kwargs.items():
             if isinstance(value, list) or isinstance(value, tuple):
                 raise NotImplementedError("List of values are not supported")
@@ -299,7 +299,7 @@
         return u'%s%s?%s' % (base_url, path, self.build_url_params(**kwargs))
 
     def build_url_params(self, **kwargs):
-        """return encoded params to incorporate them in an URL"""
+        """return encoded params to incorporate them in a URL"""
         args = []
         for param, values in kwargs.iteritems():
             if not isinstance(values, (list, tuple)):
@@ -365,7 +365,20 @@
 
     @cached
     def user_data(self):
-        """returns a dictionary with this user's information"""
+        """returns a dictionary with this user's information.
+
+        The keys are :
+
+        login
+            The user login
+
+        name
+            The user name, returned by user.name()
+
+        email
+            The user principal email
+
+        """
         userinfo = {}
         user = self.user
         userinfo['login'] = user.login