app/soc/views/models/base.py
changeset 1304 b736aed728c2
parent 1296 64918d0c97ea
child 1307 091a21cf3627
equal deleted inserted replaced
1303:08433090cff8 1304:b736aed728c2
   563       access_type : the name of the access type which should be checked
   563       access_type : the name of the access type which should be checked
   564       page_name: the page name displayed in templates as page and header title
   564       page_name: the page name displayed in templates as page and header title
   565       params: a dict with params for this View
   565       params: a dict with params for this View
   566     """
   566     """
   567 
   567 
   568     get_dict = request.GET
   568     # convert to a regular dict
   569 
   569     filter = {}
   570     data = self._logic.getForFields(filter=get_dict, limit=1000)
   570     for key in request.GET.keys():
   571 
   571       # need to use getlist as we want to support multiple values
   572     data = [i.toDict() for i in data]
   572       filter[key] = request.GET.getlist(key)
       
   573 
       
   574     entities = self._logic.getForFields(filter=filter, limit=1000)
       
   575     data = [i.toDict() for i in entities]
   573 
   576 
   574     to_json = {
   577     to_json = {
   575         'data': data,
   578         'data': data,
   576         }
   579         }
   577 
   580