2👍
✅
Use the __range
lookup:
enquiryList = ModelName.objects.filter(dateposted__range=(start_date,end_date))
Source:stackexchange.com