From: jordan Date: Sat, 19 May 2012 22:23:12 +0000 (+0000) Subject: be able to accept default page size parameter on UserListPaginatorContext X-Git-Tag: live~52 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/a0273ff358d8725b4f137dfa95754c3c43379ecb 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 --- 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):