i want to get Device created today this is my model :
class Device(models.Model):
hostname = models.CharField(max_length=200, null=True)
password = models.CharField(max_length=200, null=True)
type = models.CharField(max_length=200,choices=dtype, null=True)
ipadress = models.CharField(max_length=200, null=True)
date_created = models.DateTimeField(auto_now_add=True, null=True)
and i tried this views but didn't work :
device_today = Device.objects.filter(date_created=today).count()
any advice ?