app/soc/views/models/base.py
changeset 1269 62b1e9ee46c5
parent 1268 9d092b702f92
child 1296 64918d0c97ea
equal deleted inserted replaced
1268:9d092b702f92 1269:62b1e9ee46c5
   676     value = request.GET.get('value', None)
   676     value = request.GET.get('value', None)
   677 
   677 
   678     if field and value:
   678     if field and value:
   679       seed[field] = value
   679       seed[field] = value
   680 
   680 
       
   681   def _editContext(self, request, context):
       
   682     """Performs any required processing on the context for edit pages.
       
   683 
       
   684     Args:
       
   685       request: the django request object
       
   686       context: the context dictionary that will be used
       
   687     """
       
   688 
       
   689     pass
       
   690 
   681   def _constructResponse(self, request, entity, context, form, params):
   691   def _constructResponse(self, request, entity, context, form, params):
   682     """Updates the context and returns a response for the specified arguments.
   692     """Updates the context and returns a response for the specified arguments.
   683 
   693 
   684     Args:
   694     Args:
   685       request: the django request object
   695       request: the django request object
   719     if entity:
   729     if entity:
   720       template = params['edit_template']
   730       template = params['edit_template']
   721     else:
   731     else:
   722       template = params['create_template']
   732       template = params['create_template']
   723 
   733 
       
   734     self._editContext(request, context)
   724     return helper.responses.respond(request, template, context)
   735     return helper.responses.respond(request, template, context)
   725 
   736 
   726   def getParams(self):
   737   def getParams(self):
   727     """Returns this view's params attribute.
   738     """Returns this view's params attribute.
   728     """
   739     """