code: def trigger_edit(request, trigger_id, edit_what):
      
      if edit_what not in ('Provider', 'Consumer'):
          # bad request
          return redirect('base')
  
      form_name = edit_what + 'Form'
  
      # get the trigger object
      service = TriggerService.objects.get(id=trigger_id)
  
      if can_modify_trigger(request, service.provider.name.status, service.consumer.name.status):
          return HttpResponseRedirect(reverse('base'))
  
      if edit_what == 'Consumer':
          my_service = service.consumer.name.name
      else:
          my_service = service.provider.name.name
  
      # get the service name
      service_name = str(my_service).split('Service')[1]
      # get the model of this service
      model = get_service(my_service)
  
      # get the data of this service linked to that trigger
      data = model.objects.get(trigger_id=trigger_id)
  
      template = service_name.lower() + '/edit_' + edit_what.lower() + ".html"
  
      if request.method == 'POST':
          form = get_service(my_service, 'forms', form_name)(request.POST, instance=data)
          if form.is_valid():
              form.save()
              return HttpResponseRedirect(reverse('trigger_edit_thanks'))
      else:
          form = get_service(my_service, 'forms', form_name)(instance=data)
  
      context = {'description': service.description,
                 'edit_what': edit_what,
                 'data': data,
                 'is_secure': request.is_secure(),
                 'host': request.get_host()}
  
      return render(request, template, {'form': form, 'context': context})
docs: edit the provider
          :param request: request object
          :param trigger_id: ID of the trigger to edit
          :param edit_what: edit a 'Provider' or 'Consumer' ?
          :type request: HttpRequest object
          :type trigger_id: int
          :type edit_what: string
          :return render
          :rtype HttpResponse