New functions shortcuts
authorThierry Florac <tflorac@ulthar.net>
Sat, 10 Oct 2009 00:19:15 +0200
changeset 22 941b8c5eb563
parent 21 d18c6cb028a8
child 23 d6a38a66c8a6
New functions shortcuts
ztfy/utils/request.py
--- a/ztfy/utils/request.py	Tue Sep 29 22:35:14 2009 +0200
+++ b/ztfy/utils/request.py	Sat Oct 10 00:19:15 2009 +0200
@@ -45,6 +45,8 @@
         request = getRequest()
     return request.principal
 
+getPrincipal = getRequestPrincipal
+
 
 def getRequestAnnotations(request=None):
     """Get annotations from given request"""
@@ -52,6 +54,8 @@
         request = getRequest()
     return IAnnotations(request)
 
+getAnnotations = getRequestAnnotations
+
 
 def getRequestData(key, request=None, default=None):
     """Get request data, stored into request annotations"""
@@ -61,8 +65,12 @@
     except:
         return default
 
+getData = getRequestData
+
 
 def setRequestData(key, data, request=None):
     """Define request data, stored into request annotations"""
     annotations = getRequestAnnotations(request)
     annotations[key] = data
+
+setData = setRequestData