Django Models.py Convert DatetimeField à Datefield
# Add a method to your model class
# call it like any other field in your template
class Yourclass(models.Model):
date_field = models.DateTimeField()
def date_trunc_field(self):
return self.date_field.date()
Trained Tuna