title: Rendering a dictionary of retrieved objects in views.py Django
body: <p>I have written code to retrieve some objects and have ordered them by date.</p>
  
  <pre><code>    def updates(request):
          updates = Update.objects.order_by('-update_date')
          context = {
          'updates' : updates
          }
      return render(request, 'main/update.html', context)
  </code></pre>
  
  <p>I want to create a dictionary such that the 'key' is the year value of the object's date field, and the 'value' is the list of all the objects coming under that year. Is there any way I could implement this? </p>
  
  <p>Thanks in advance for your help.</p>