I have a page on my website where user can upload a xlsx file using ajax, on backend I read the file, do a little processing and start inserting its rows one by one in my database. If the files uploaded by the user gets quite large, entering new values in the database can take a while. Therefore I want to give user real-time progress update on their screen, eg. - 

```
Found 100 rows of data
Interesting 1/100.
Interesting 2/100.
...
Interesting 100/100.
Done.

```

My View:

```
import pandas as pd

def myView(self, request):
    """Handle POST requests, save all data provided in excel file."""
    excel_file = request.FILES.get('excel_one')
    excel_df = pd.read_excel(excel_file)
    data_format = ['Option_1', 'Option_2', 'Option_3', 'Option_4',]
    try:
        formatted_df = excel_df[data_format]
    except KeyError as error:
        return JsonResponse({'success': False, 'message': str(error), })
    # forloop to create model objects
    for i, v in formatted_df.iterrows():
        # do a lot of data validating and stuff first
        MyModels.objects.create(arguments)
        print(f'Created object {i+1}/{len(formatted_df)}!'  # Want to to be sent to html page in real time
    return JsonResponse({'success': True, })

```

I am making an ajax request like this: 

```
$.ajax({  // variables url, data, etc. contain the expected stuff
    async: false,
    url: url,
    method: "POST",
    data: data,
    success: function(d){
        if(data.success){
            console.log(d);
         }
         else{
             $('.log').append('<p><b>Error:</b> '+ d.message +'</p>')
         }
     },
     cache: false,
     contentType: false,
     processData: false
});

```

Saving data in database and everything else is working as expected but I just can't figure out how to send real-time updates to ajax. One possible solution I can think of is to implement web sockets instead of normal http requests, but I am in a little hurry so is there any way to do it with simple js and django.