title: django extract only year from date time in queryset
body: <p>I have a purchases table with a column datatime. I would like to select all purchases I have done in the current year. bellow is my code but is not working!</p>
  
  <pre><code>import datetime
  today = datetime.date.today()
  year = Purchases.objects.filter(date__year = today.year)
  </code></pre>
  
  <p>I expect the year should be 2018 extracted from 2018-04-12</p>