title: How to choose a specific object from a many to many field relationship inside a template in django
body: <p>I am passing in a bunch of Project objects into my template as the variable 'projects'.
  Then I loop over each of them like this:</p>
  
  <pre><code>{% for project in projects %}
      &lt;div class="conflict"&gt;
          &lt;h2&gt;{{ project.title }}&lt;/h2&gt;
          &lt;div class="conflictdata"&gt;
              &lt;p&gt;A conflict with *USER*&lt;/p&gt;
              &lt;p&gt;Created on *DATE*&lt;/p&gt;
              &lt;p&gt;MORE INFO HERE?&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>Now the project models has a many to many relationship with the Django user model (but each project only has two users) (while every user can have many projects). What I would like to do is exclude the current logged in {{user}} from the Project.users queryset and display it in my template (because that would be the user with whom the current logged in user shares said project).</p>
  
  <p>How could I achieve this?</p>
  
  <p>Also here's my view in case it helps: </p>
  
  <pre><code>@login_required
  def myconflicts(request):
      form = ProjectForm(request.POST or None)
      if request.method == "POST":
          form = ProjectForm(request.POST)
          if form.is_valid():
              project = form.save()
              project.users.add(request.user)
              project.users.add(User.objects.last())
              return redirect('problemdashboard:problem-dashboard', project_id=project.pk)
              form = NeedForm()
          else:
              form = NeedForm()
      return render(request, 'conflictmanagement/myconflicts.html', {
          'form': form,
          'projects': request.user.project_set.all()
           })
  </code></pre>