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 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) date= models.DateField() 
> author=models.ForeignKey(User, on_delete=models.CASCADE) 
> body=models.TextField() 
>
> def __str__(self) -> str:
> return self.title 
>
> #games model
>
> GAME_TYPE=( ("action", "action"), ("adventure", "adventure"), ("racing", 
> "racing"), ("puzzle", "puzzle"), )
>
> MOV_TYPE=( ("action", "action"), ("adventure", "adventure"), ("sci-fi", 
> "sci-fi"), ("horror", "horror"), ("drama", "drama"), ) 
>
> GAME_OS=( ("Windows", "Windows"), ("Android", "Android"), ) 
>
> class Games(models.Model): name=models.CharField(max_length=50) 
> type=models.CharField(max_length=40, choices=GAME_TYPE) 
> os=models.CharField(max_length=15, choices=GAME_OS) img=models.ImageField() 
> developer=models.CharField(max_length=50) 
> version=models.CharField(max_length=10) 
> ratings=models.CharField(max_length=10) description=models.TextField() 
>
> def __str__(self) -> str: 
> return self.name class
>
> Movies(models.Model): name=models.CharField(max_length=50) 
> type=models.CharField(max_length=40, choices=MOV_TYPE) 
> description=models.TextField() released=models.DateField() 
>
> def __str__(self) -> str: 
> return self.name 
>
> I have three models below, but l like to create a Notification System to 
> send a message to a User whenever ; 
> 1. An object is created in all those models 
> 2. An object is modified in all those models 
>
> And l would like to add trick that it sends the Notification Message after 
> 15 minutes of publiction or creation.
>
> And I would like to pass the following data if available in the object ;
> 1. the Name of the Object,
> 2. the Image of the Object, and 
> 3. the type of the Object. 
>
> Lastly I would like to add a : 
> 1. Notification DELETE function, that gives User a way to delete that 
> Message , not to appear in his or notification section again. 
>
> 2. Mark as Read function, that changes the Massage Div Color 
>
> 3. A notification Barge that displays the UNREAD Messages. 
>
> Am requesting anyone to help me Because Am stuck , I have no where to 
> Start from. I will be on waiting your guidelines. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aecadf6d-3bc4-4e9c-a1e7-5b43003ee737n%40googlegroups.com.

Reply via email to