title: Django datetime month and year filtering not working
body: <p>I am trying to filter with date and month in a query but unable to filter with month.
  I checked my code but I am unable to find the error in my code please help me .
  <br>
   am I missing something in below code ?</p>
  
  <pre><code>class CustomerVisits(AdminOnlyMixin, ListView):
      model = Visit
      template_name = "affiliates/admin/visits/list.html"
      paginate_by = 10
      context_object_name = "visits"
      def get_affiliate_user(self):
          affiliate = Affiliate.objects.get(affiliate_user=self.request.user)
          return affiliate
  
  def get_queryset(self):
      object_list = self.model.objects.all()
      email = self.request.GET.get('email') # test@gmail.com
      date = self.request.GET.get('monthYear')# January 2016
  
      if email:             
          object_list = object_list.filter(affiliate_user__affiliate_user__email=email)
      if date:
          month, year = date.split()
          month_num = {
                  'Jan' : 1,
                  'Feb' : 2,
                  'Mar' : 3,
                  'Apr' : 4,
                  'May' : 5,
                  'Jun' : 6,
                  'Jul' : 7,
                  'Aug' : 8,
                  'Sep' : 9, 
                  'Oct' : 10,
                  'Nov' : 11,
                  'Dec' : 12
          }[month[:3]]
          object_list = object_list.filter(visit_time__year=year,visit_time__month=month_num)
          print object_list
      return object_list
  </code></pre>