# HG changeset patch # User Todd Larsen # Date 1222826564 0 # Node ID 2204287da37496983ffa864936423f6c169190b5 # Parent b116326abf74fd971671fe6cca0b8594fb5eacda Add placeholder for future (to-be-implemented) getPreferredListPagination() function. diff -r b116326abf74 -r 2204287da374 app/soc/views/helpers/list_helpers.py --- 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