Just register post_update signal with the Model you want to "watch" to be
created/updated, and in optimal case send message to some asynchronous
queue, which will take message 15 minutes late and processes it by creating
Notification object. For example async queue = aws sqs, they even support
First of all - notification - what do you mean by notification?
If you mean that the user should be notified in the instance when someone
creates / updates / deletes your models - you will need to have either
server side events or websockets to communicate with the frontend. You
could also poll
https://stackoverflow.com/questions/14543824/django-get-notified-of-all-changes-in-database
check this one out, you might find some hints or answers.
On Tuesday, August 22, 2023 at 9:03:12 AM UTC-5 Byansi Samuel wrote:
> My views
> from django.shortcuts import render def
My views
from django.shortcuts import render def auto_notification(request): return
render (request, "user/dashboard.html")
My models
from django.db import models from django.contrib.auth.models import User
#articles model
class Articles(models.Model):
title = models.CharField(max_length=300)
4 matches
Mail list logo