django filter by date range

33

Sample.objects.filter(date__range=["2011-01-01", "2011-01-31"])
Sample.objects.filter(date__year='2011', 
                      date__month='01')

Comments

Submit
0 Comments