how can i add an expiration date function on a model?
问题 i am trying to make a key verification app that when accepted it would create the same app on the user's profile, so i have done everything but i have struggled making the expiration date part, i want the expired boolean become true when the date is expired, but i have no idea on how to implement it #models.py class ProductKey(models.Model): product = models.ForeignKey(Product, on_delete=models.CASCADE, unique=False) key = models.CharField(max_length=14) valid_from = models.DateTimeField