app/soc/views/models/base.py
changeset 572 1b3e7280743a
parent 563 4a8565ce48c6
child 573 1b37588c4922
equal deleted inserted replaced
571:2aad108bc617 572:1b3e7280743a
   368       params: a dict with params for this View
   368       params: a dict with params for this View
   369       contents: a list of content dicts
   369       contents: a list of content dicts
   370       page_name: the page name displayed in templates as page and header title
   370       page_name: the page name displayed in templates as page and header title
   371     """
   371     """
   372 
   372 
   373     offset, limit = helper.lists.cleanListParameters(
       
   374       offset=request.GET.get('offset'), limit=request.GET.get('limit'))
       
   375 
       
   376     context = helper.responses.getUniversalContext(request)
   373     context = helper.responses.getUniversalContext(request)
   377     context['page_name'] = page_name
   374     context['page_name'] = page_name
   378     context['pagination_form'] = helper.lists.makePaginationForm(request, limit)
       
   379     context['list'] = soc.logic.lists.Lists(contents)
   375     context['list'] = soc.logic.lists.Lists(contents)
   380 
   376 
   381     context['entity_type'] = params['name']
   377     context['entity_type'] = params['name']
   382     context['entity_type_plural'] = params['name_plural']
   378     context['entity_type_plural'] = params['name_plural']
   383 
   379