Skip to content

Commit

Permalink
be able to accept default page size parameter on UserListPaginatorCon…
Browse files Browse the repository at this point in the history
…text

git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1265 0cfe37f9-358a-4d5e-be75-b63607b5c754
  • Loading branch information
jordan committed May 19, 2012
1 parent 273f586 commit b9b2def
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forum/views/users.py
Expand Up @@ -33,13 +33,13 @@ def apply(self, objects):
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):
Expand Down

0 comments on commit b9b2def

Please sign in to comment.