app/soc/views/models/org_app.py
changeset 1349 d05a9bf08c11
parent 1343 4ba39392c854
child 1430 ff8cc6b15e6a
equal deleted inserted replaced
1348:8e3bd495729f 1349:d05a9bf08c11
   181        to bulk-accept orgs.
   181        to bulk-accept orgs.
   182     """
   182     """
   183 
   183 
   184     program_entity = program_logic.logic.getFromKeyName(kwargs['scope_path'])
   184     program_entity = program_logic.logic.getFromKeyName(kwargs['scope_path'])
   185 
   185 
   186     # get all pre-accepted org applications for the given program
   186     # get all pre-accepted organization applications for the given program
   187     filter = {'scope' : program_entity,
   187     filter = {'scope' : program_entity,
   188               'status' : 'pre-accepted'}
   188               'status' : 'pre-accepted'}
   189     org_app_entities = org_app_logic.logic.getForFields(filter=filter)
   189     org_app_entities = org_app_logic.logic.getForFields(filter=filter)
   190 
   190 
   191     # convert each application into a dictionary containing only the fields
   191     # convert each application into a dictionary containing only the fields
   207     # use the standard JSON template to return our response
   207     # use the standard JSON template to return our response
   208     context = {'json': json}
   208     context = {'json': json}
   209     template = 'soc/json.html'
   209     template = 'soc/json.html'
   210 
   210 
   211     response = responses.respond(request, template, context)
   211     response = responses.respond(request, template, context)
   212     # TODO IE7 seems to ignore the headers
   212     
       
   213     # if the browser supports HTTP/1.1
       
   214     # post-check and pre-check and no-store for IE7
       
   215     response['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'
       
   216     # if the browser supports HTTP/1.0
   213     response['Pragma'] = 'no-cache'
   217     response['Pragma'] = 'no-cache'
   214     response['Cache-Control'] = 'no-cache, must-revalidate'
   218     
   215     return response
   219     return response
   216 
   220 
   217 
   221 
   218 view = View()
   222 view = View()
   219 
   223