How to display a ManyToMany fields in the template
<p>I wonder how I can retrieve my template a ManyToMany fields ...
For example, in my model I would like to retrieve the page corresponding to each question and post it in the template ...
I have 4 values in my class Page ("visit 1 visit 2 visit 3, 4 .. visit")
And I associated in my database each question with a "visit"</p>

<p>And I wish I could now see how visits to any question in my template.</p>

<p>I will share my models:</p>

<pre><code>class Page(models.Model):
    title = models.CharField(max_length=30)


    def __str__(self):
        return self.title

class Question(models.Model):
    label = models.CharField(max_length=30)
    page = models.ManyToManyField(Page)

    def __str__(self):
            return self.label

class Reply(models.Model):
    question = models.ForeignKey(Question)
    user = models.ForeignKey(Personne)
    answer = models.CharField(max_length=30)
    creationDate = models.DateTimeField(default=datetime.datetime(2016, 1, 20, 15, 4, 21, 467165))

    def __str__(self):
        return str(self.answer)
</code></pre>

<p>And my templates :</p>

<pre><code>{% for reply in replies %}&lt;br&gt;
    &lt;br&gt; {{ reply.user }}
    {{ reply.question }} -
    {{ reply.answer }}
    (dans la :{% for page in questions.page %} {{ page }}) {% endfor %}  #this is this line who doesn't work 
{% endfor %}
</code></pre>

<p><strong>How do I call in the template page for a given question?</strong></p>

<blockquote>
  <p>EDIT :</p>
</blockquote>

<pre><code>def reply(request):
    replies = Reply.objects.all()
    questions = Question.objects.all()
    logged_user = get_logged_user_from_request(request)
    pages = Page.objects.all()
    form = ReplyBisForm(request.GET)
    personnes = Personne.objects.all()
    if logged_user:
        if len(request.GET) &gt; 0:
            form = ReplyBisForm(request.GET)
            if form.is_valid():
                form.save(commit=True)
                return HttpResponseRedirect('/reply')
            else:
                return render_to_response('polls/reply.html', {'personnes': personnes, 'replies': replies, 'questions': questions,'pages':pages, 'form': form})
        else:
            form = ReplyBisForm()
            return render_to_response('polls/reply.html', {'personnes':personnes, 'replies': replies, 'questions': questions, 'pages':pages, 'form': form})
    else:
    return HttpResponseRedirect('/login')
</code></pre>