samedi 30 novembre 2019

Update the text for making progress bar using Django

To show the progress on the web using Django, I want to show the progress using text on the web.

In the code, there are few functions, I want to update the text on the web right after the function is completed

I wonder, How can I solve this problem, is it possible to solve this problem by changing the code in views.py?

[views.py]

def post_list(request):

    print("start")

    functionA()
    print("function A is done")

    functionB()
    print("function B is done")

    return render(request, 'blog/post_list.html', {'posts' : "function A is Done})

Expected outcome:

On web "Start" => function A is running => "Function A is done" => function B is running => "Function B is done"




Aucun commentaire:

Enregistrer un commentaire