I am stuck in one problem and i want to notify current logged user for it's insurance will be expired within 5 days ago.
class Vehicle(models.Model):
vehicle_no = models.CharField(max_length=100, blank=False, null=False)
chasis_no = models.CharField(max_length=100, blank=False, null=False, unique=True)
make = models.CharField(max_length=100, blank=False, null=False)
insurance_no = models.CharField(max_length=100, blank=False, null=False)
insurance_date = models.DateField(blank=False, null=False)
insurance_expiry_date = models.DateField(blank=False, null=False)
Please help me to find exact solution
You need something called
cronorcronjob. Very easy to use isdjango-crontab.Install:
your_app/cron.py:
settings.py:
Then activate / control / remove with commands:
More details get on pypi.org.