code: def progress(request):
      
      if 'delete' in request.GET:
          models.MachineCache.objects.all().delete()
          models.InstituteCache.objects.all().delete()
          models.PersonCache.objects.all().delete()
          models.ProjectCache.objects.all().delete()
          return render(
              template_name='main.html',
              context={'content': 'Deleted'},
              request=request)
  
      if request.method == 'POST':
          if 'task_id' in request.POST:
              result = Task.AsyncResult(request.POST['task_id'])
              if result.failed():
                  value = {
                      'info': {},
                      'ready': result.ready(),
                  }
              else:
                  value = {
                      'info': result.info,
                      'ready': result.ready(),
                  }
              return HttpResponse(
                  json.dumps(value), content_type="application/json")
      return None
docs: Check status of task.