django models.py convert DateTimeField to 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()