I have a notice model that creates a notice, I would like to schedule notices to be created at certain dates. Basically, I mean using another model I want to schedule and create the notices at that date specified in the schedule notice.
How would I do this? What's the easier road to achieve this? All I can think of is rabbitmq and celery. And i don't even know how it would create a notice at a dynamic date.
class Notice(models.Model):
title = models.CharField(max_length=200)
contentt = RichTextField(blank=True, null=True)
slug = models.SlugField(unique=True)
def __str__(self):
return self.title
class Schedule(models.Model):
title = models.CharField(max_length=200)
contentt = RichTextField(blank=True, null=True)
date = models.DateTimeField()
def __str__(self):
return self.title
Above is a models.py example to clarify what o mean, I actually don't have a model. I use an api to read and write to a collection in an external mongodb.
So for every schedule created, it uses the date on it to create a notice that contains the title and the content of the schedule model. So different persons can create schedules for notices and at that particular date it creates it. How do I do this?