title: 'QuerySet' object has no attribute
body: <p>Please could you me why I get this error message while displaying "fav" in my template</p>
  
  <pre><code>QuerySet object has no attribute game_id
  </code></pre>
  
  <p>I tried to replace <code>game_id</code> by <code>game</code>, <code>id_game</code> but nothing...</p>
  
  <p>view.py</p>
  
  <pre><code>from django.contrib import messages
  from django.conf import settings
  from django.contrib.auth.models import User
  from django.contrib.auth import authenticate, login, logout
  from django.shortcuts import render
  from start.models import Games, FavoriteGames
  import urllib, json
  
  def view_recap(request):
      if request.user.is_authenticated():
          username = request.user.username
          id_user = request.user.id
          fav = FavoriteGames.objects.filter(user_id=id_user).game_id
          return render(request, 'recap.html', locals())
      else:
          from start.views import view_logoff
          from start.views import view_logon
          messages.add_message(request, messages.INFO, 'Vous devez être connecté pour accéder à cette page.')
          return redirect(view_logon)
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>from django.db import models
  from django.conf import settings
  
  # Create your models here.
  class Games(models.Model):
      guid = models.CharField(max_length=100, unique=True, null=False, verbose_name="GUID")
      title = models.CharField(max_length=100, null=False, verbose_name="Titre")
      logo = models.CharField(max_length=100, null=True, blank=True, verbose_name="Logo")
      date = models.DateTimeField(auto_now_add=True, auto_now=False, verbose_name="Date de création")
      update = models.DateTimeField(auto_now=True, verbose_name="Dernière modification")
      def __str__(self):
          return self.title
  
  class FavoriteGames(models.Model):
      game = models.ForeignKey('Games')
      user = models.ForeignKey(settings.AUTH_USER_MODEL)
  </code></pre>