app/soc/views/helpers/list_helpers.py
changeset 228 2204287da374
parent 185 2f3bd84bb106
child 265 3c2994f3b85f
--- a/app/soc/views/helpers/list_helpers.py	Wed Oct 01 00:53:36 2008 +0000
+++ b/app/soc/views/helpers/list_helpers.py	Wed Oct 01 02:02:44 2008 +0000
@@ -24,6 +24,19 @@
 
 DEF_LIMIT = 10
 
+
+def getPreferredListPagination(user=None):
+    """Returns User's preferred list pagination limit.
+    
+    Args:
+      user: User entity containing the list pagination preference;
+        default is None, to use the current logged-in User
+    """
+    # TODO: eventually this limit should be a User profile preference
+    #   (stored in the site-wide User Model) preference 
+    return DEF_LIMIT
+
+
 def getListParemeters(offset=None, limit=None):
   """Updates and validates offset and limit values of the list.
 
@@ -130,4 +143,4 @@
      'first': offset+1,
      'last': len(list_data) > 1 and offset+len(list_data) or None})
   
-  return context
\ No newline at end of file
+  return context