Human: Django database query: How to filter objects by date range? Assistant: 
Here is some code to filter objects month wise in django model `Sample` for year `2011`

Sample.objects.filter(date__year='2011', date__month='01')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.