XuUserAC
XuUserAC

Reputation: 141

Notify user if data has changed since page loaded

I have 3 users that can view and commit changes to a database. Let's take for example an app called "personel". These 3 users can view the list of personel, edit personel data, and remove personel entries, from custom views. I am trying to solve this scenario:

  1. User A goes to /view_personel_list/
  2. User B goes to /edit_personel/3/, and saves changes.
  3. User A is still viewing the non-updated personel list.

I know this could be solved using AJAX, but I do not want to refresh. I am looking for a way to notify User A that the database has been changed.

Upvotes: 0

Views: 226

Answers (1)

Sirwill98
Sirwill98

Reputation: 309

I am developing an app that has the same exact problem, the way i have resolved it is to use Django-Channels which allows sending notifications on object saves that can effect other users of the site

to prevent refreshes i chose to store the data being viewed in an iframe so i only refresh the iframe on a notification from channels

Upvotes: 1

Related Questions