Hi,
Is there a video tutorial that is available to follow and do web notifications. I want people who are on the web to automatically receive a notification whenever a new blog post has been added.
Background: I have django app where I update posts in the admin panel which appears on the front end. There is no user login on this. What I want is to enable web notifications so that whenever there is a new post,and if there is someone on the browser, they should receive a notification.
Regards,
Anwar
I am assuming you are looking for creating notification like web notification without refreshing the page.If yes then below are my strategy,
Lets talk about requirement,
First when we say without without refreshing the page, then we will think AJAX for this requirement. Yes we can do that, but it will not update or alert other client pages. So we need to think about other approach. This is where we need to think about "WEB SOCKETS".
Using Websockets , sending and writing to the backend is very easy. Now how we can use websockets in Django?
There is popular package called django-channels. Here is the link Django Channels Docs
Now, we need to design our Models and view accordingly to send the data from Client to backend and store it. At the same time we need to return the data back to the other client through the same socket.
Let me know if you need more details on the same.