I have a model that takes an expires_at
time field. In the sense, the user can set a time beyond which the entry is invalid. At that time, I need to do specific actions such as send email and/or change a parameter in the model.
Specifically, say I have a model thus:
class SomeModel(models.Model):
... #Code here ...
expires_at = models.DateTimeField()
Now, when the model is saved, there will be a time set in the expires_at
field that is some time in the future. When this time occurs, I need to send an email.
I have looked at the signals feature of django, but haven't been very successful. I don't want to resort to running cronjobs that keep polling the database or something. Can someone point me in the right direction?