code: def proxy_callback(request):
      
  
      pgtIou = request.GET.get('pgtIou')
      tgt = request.GET.get('pgtId')
  
      if not (pgtIou and tgt):
          logger.info('No pgtIou or tgt found in request.GET')
          return HttpResponse('No pgtIOO', content_type="text/plain")
  
      try:
          PgtIOU.objects.create(tgt=tgt, pgtIou=pgtIou, created=datetime.datetime.now())
          request.session['pgt-TICKET'] = pgtIou
          return HttpResponse('PGT ticket is: {ticket}'.format(ticket=pgtIou), content_type="text/plain")
      except Exception as e:
          logger.warning('PGT storage failed. {message}'.format(
              message=e
          ))
          return HttpResponse('PGT storage failed for {request}'.format(request=str(request.GET)),
                              content_type="text/plain")
docs: Handles CAS 2.0+ XML-based proxy callback call.
      Stores the proxy granting ticket in the database for
      future use.
  
      NB: Use created and set it in python in case database
      has issues with setting up the default timestamp value