Manu Febie
Manu Febie

Reputation: 31

Django deadline-timer

I am building a management application for a company. One of the things the application can do is start new projects. The model for this is:

class Project(models.Model):
    employees = models.ManyToManyField(settings.AUTH_USER_MODEL)
    division = models.ForeignKey(Division)
    client = models.ForeignKey(Company)
    description = models.CharField(max_length=120)
    timestamp = models.DateTimeField(auto_now_add=True)
    deadline = models.DateField(blank=True)
    active = models.BooleanField(default=True)

As you can see in the model, an employee can set a deadline for their project. I need to be able to send the user notifications if they are close to their deadline.

For example, if the deadline is in two days, the user will get a notification like "Your deadline for projectname is over two days". So basically, what I need is a deadline timer.

What is the logic for this? I don't really know where to start with this.

Upvotes: 0

Views: 541

Answers (0)

Related Questions