Reputation: 47
Attempting to filter a MYSQL database to return a set of objects created on a given day:
len(Model.objects.filter(x__year=year, x__month=month, x__day=day)
Checked the database and there are objects there. The previous line of code still returns no objects ~0.
What is causing this?
Upvotes: 0
Views: 123
Reputation: 24110
Maybe just that you have a single underscore in x_month
-- should be x__month
.
Upvotes: 3