# Need to render same html for all Users of a particular page

**URL:** <https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569>\
**Category:** Using Django\
**Created:** [July 22, 2020, 5:13pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569 "2020-07-22T17:13:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ABHI2410](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abhi2410/32/4112_2.png) [@ABHI2410](https://forum.djangoproject.com/u/ABHI2410)\
**Post date:** [July 22, 2020, 5:13pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/1 "2020-07-22T17:13:04Z")

</div>

I have a page which is showing the progress of my local database getting synchronized with database stored on the cloud(As backup DB). it takes times like 10-15 mins for synchronization. Is it possible to show that same progress page to all the users and machines if they visit it when the synchronization is going on? like if I use my laptop and start syncing DB it will show progress continuously, then I use my other laptop and visit the synchronization page it should show the same progress as shown by my first laptop.  
is it possible ?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [July 22, 2020, 6:24pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/2 "2020-07-22T18:24:30Z")

</div>

In theory, yes. The specifics are going to vary based upon the details of the process.

“Showing progress continuously” - could most easily be done by having the page auto-refresh every 5 seconds or so.

Are you starting the synchronization through a view, or are you running it some other way?

Do you have programmatic access to the progress statistics?

---

<div class="post-metadata">

**Author:** ![ABHI2410](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abhi2410/32/4112_2.png) [@ABHI2410](https://forum.djangoproject.com/u/ABHI2410)\
**Post date:** [July 22, 2020, 6:43pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/3 "2020-07-22T18:43:43Z")

</div>

Yes, I am starting synchronization through a view function and send/receiving one table at a time (for each table I can start process individually but currently I have automated one table after another) I also have programmatic access to the progress statistics.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [July 22, 2020, 6:48pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/4 "2020-07-22T18:48:34Z")

</div>

So yes, create a view that displays the current status and have it refresh every 5 - 10 seconds. Anyone going to that page would see that status.

---

<div class="post-metadata">

**Author:** ![ABHI2410](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abhi2410/32/4112_2.png) [@ABHI2410](https://forum.djangoproject.com/u/ABHI2410)\
**Post date:** [July 22, 2020, 6:54pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/5 "2020-07-22T18:54:43Z")

</div>

well the problem is that when anyone visits that page it show default page like synchronization has not even started. its like it doesn’t know that sync is going on in background.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [July 22, 2020, 6:58pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/6 "2020-07-22T18:58:48Z")

</div>

I’m not talking about your existing view. I’m saying you need to create a _new_ view that obtains the progress information and displays it.

---

<div class="post-metadata">

**Author:** ![ABHI2410](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abhi2410/32/4112_2.png) [@ABHI2410](https://forum.djangoproject.com/u/ABHI2410)\
**Post date:** [July 22, 2020, 7:00pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/7 "2020-07-22T19:00:30Z")

</div>

okay i will try it.  
Thank You…

---

<div class="post-metadata">

**Author:** ![ABHI2410](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abhi2410/32/4112_2.png) [@ABHI2410](https://forum.djangoproject.com/u/ABHI2410)\
**Post date:** [July 23, 2020, 4:38am UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/8 "2020-07-23T04:38:52Z")

</div>

KenWhitesell i tried it no luck it shows progress on one device but not on other. I think my view function in not able to identify that i has already received post request from other machine.

```

@login_required
@allowed_users(allowed_roles=['admin'])
def data(request):
    grp = request.user.groups.values_list()
    if request.method == "POST":
        return StreamingHttpResponse(DataComputing())
    else:
        context = {"grp_name":grp[0][1],}
        return render(request,'sheetg/dataentry.html',context)

```

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [July 23, 2020, 12:00pm UTC](https://forum.djangoproject.com/t/need-to-render-same-html-for-all-users-of-a-particular-page/3569/9 "2020-07-23T12:00:13Z")

</div>

There isn’t going to be a POST on this second view - that’s not it’s purpose.

The whole idea of this second view is that, by going to it, will display the current status, and that’s all. It’s a GET-only view.
