app/soc/views/site/sponsor/list.py
changeset 263 9b39d93b677f
parent 259 74eb6b01c82c
child 265 3c2994f3b85f
equal deleted inserted replaced
262:52a42831d9d6 263:9b39d93b677f
    44   offset = request.GET.get('offset')
    44   offset = request.GET.get('offset')
    45   limit = request.GET.get('limit')
    45   limit = request.GET.get('limit')
    46 
    46 
    47   offset, limit = list_helpers.getListParemeters(offset, limit)
    47   offset, limit = list_helpers.getListParemeters(offset, limit)
    48   
    48   
    49   sponsors = sponsor.getSponsorsForOffsetAndLimit(offset, limit)
    49   # Fetch one more to see if there should be a 'next' link
       
    50   sponsors = sponsor.getSponsorsForLimitAndOffset(limit + 1, offset=offset)
       
    51 
       
    52   # TODO(tlarsen): uncomment when pagination select control is working.
       
    53   # form = list_helpers.makeSelectNumItemsForm(request, limit)
       
    54   # context['form'] = form
    50   
    55   
    51   list_templates = {'list_main': 'soc/list/list_main.html',
    56   list_templates = {'list_main': 'soc/list/list_main.html',
    52                     'list_pagination': 'soc/list/list_pagination.html',
    57                     'list_pagination': 'soc/list/list_pagination.html',
    53                     'list_row': 'soc/group/list/group_row.html',
    58                     'list_row': 'soc/group/list/group_row.html',
    54                     'list_heading': 'soc/group/list/group_heading.html'}
    59                     'list_heading': 'soc/group/list/group_heading.html'}