From a0273ff358d8725b4f137dfa95754c3c43379ecb Mon Sep 17 00:00:00 2001 From: jordan Date: Sat, 19 May 2012 22:23:12 +0000 Subject: [PATCH] be able to accept default page size parameter on UserListPaginatorContext git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1265 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/views/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forum/views/users.py b/forum/views/users.py index df38159..0777005 100644 --- a/forum/views/users.py +++ b/forum/views/users.py @@ -33,13 +33,13 @@ class UserReputationSort(pagination.SimpleSort): return objects.order_by('-is_active', self.order_by) class UserListPaginatorContext(pagination.PaginatorContext): - def __init__(self, pagesizes=(20, 35, 60)): + def __init__(self, pagesizes=(20, 35, 60), default_pagesize=35): super (UserListPaginatorContext, self).__init__('USERS_LIST', sort_methods=( (_('reputation'), UserReputationSort(_('reputation'), '-reputation', _("sorted by reputation"))), (_('newest'), pagination.SimpleSort(_('recent'), '-date_joined', _("newest members"))), (_('last'), pagination.SimpleSort(_('oldest'), 'date_joined', _("oldest members"))), (_('name'), pagination.SimpleSort(_('by username'), 'username', _("sorted by username"))), - ), pagesizes=pagesizes) + ), pagesizes=pagesizes, default_pagesize=default_pagesize) class SubscriptionListPaginatorContext(pagination.PaginatorContext): def __init__(self): -- 2.39.5