title: How can I resolve query object error - ValueError: Cannot query "mayur": Must be "User" instance
body: <p>I am trying to access my followers in the available module, I can get the number of count such as the number of followers and number of followings but I can't get the list of followers to see my followers. Need suggestions.</p>
  
  <p>My module.py File:</p>
  
  <pre><code>from django.db import models
  
  class FollowerFollowing(models.Model):
          user_from = models.ForeignKey('User', on_delete=models.SET_NULL, null=True, related_name='rel_from_set')
          user_to = models.ForeignKey('User', on_delete=models.SET_NULL, null=True, related_name='rel_to_set')
          created = models.DateTimeField(auto_now_add=True, db_index=True)
  
          class Meta:
              ordering = ('-created',)
  
          def __str__(self):
              return '{} follows {}'.format(self.user_from, self.user_to)
  
  
      User.add_to_class('following', models.ManyToManyField('User', through=FollowerFollowing, related_name='followers', symmetrical=False))
  </code></pre>
  
  <p>My views.py File:</p>
  
  <pre><code>def follower(request):
      print(request)
      if request.session['user_id']:
          query = FollowerFollowing.objects.filter(user_from=request.user)
          print(query)
          context = {
              'query': query
              }
          return render(request, 'Instagram_app/following.html', context)
      else:
          pass
      return HttpResponse("No user logged in")
  </code></pre>
  
  <p>follower.html (template)</p>
  
  <pre><code>{% extends 'Instagram_app/home.html'%}
  {% block content %}
      &lt;h2&gt;following&lt;/h2&gt;
      &lt;div id="action-list"&gt;
          {% for result in query %}
              &lt;h1&gt;{{ result }}&lt;/h1&gt;
          {% endfor %}
      &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>Console error is: </p>
  
  <pre><code>(value, opts.object_name))
  ValueError: Cannot query "mayur": Must be "User" instance.
  [20/Jun/2018 11:45:27] "GET /Instagram_app/follower HTTP/1.1" 500 105165
  </code></pre>
  
  <p>Need suggestions to solve this problem. Thank you</p>