I have this code
class MyModel(models.Model):
date = models.DateTimeField(blank=True, default=datetime.now)
in models.py. In view I get the object:
obj = MyModel.objects.get(id=2)
and i wish change the date for the year ahead. How to do this?
If you need to be exact with leap years: