title: Django How to send data from view to template
body: <p>model.py</p>
  
  <pre><code>class Peer(models.Model):
      router = models.ForeignKey(Router, on_delete=models.CASCADE)
      ipv4_address = models.CharField(max_length=250)
      remote_as = models.CharField(max_length=250)
  </code></pre>
  
  <p>I have a custom button in Django admin Change form</p>
  
  <pre><code>&lt;input type="submit" value="Test Peer" name="_peer-test"&gt;
  </code></pre>
  
  <p>Then in admin.py</p>
  
  <pre><code>def response_change(self, request, obj):
      if "_peer-test" in request.POST:
         self.message_user(request, "Peer Tested")
         url = request.POST.get('obj', '/peeringmanager/export')
         remote_as = obj.remote_as
         url += "?remote_as={}".format(remote_as)
         return HttpResponseRedirect(url)
  </code></pre>
  
  <p>So I sent the data (remote_as) from the obj to another view</p>
  
  <p>views.py</p>
  
  <pre><code>def export(request):
      remote_as = request.GET.get('remote_as','')
      selected_peer = Peer.objects.filter(remote_as__exact=remote_as)
      template= loader.get_template('delete-peer.html')
  
      content= {
          'selected_peer':selected_peer,
      }
      return HttpResponse(template.render(content,request))
  </code></pre>
  
  <p>Here I want to use remote_as object to get all object in the form related to that Remote_as and sent it to a html.</p>
  
  <p>delete-peer.html</p>
  
  <pre><code>{% block content %}
      {% for peer in content %}
          &lt;p&gt;{{ peer.remote_as }}&lt;/p&gt;
      {% endfor %}
  
  {% endblock %}
  </code></pre>
  
  <p>But I don't get any Data in HTML. any Idea? of a better way?
  Right now it results in an empty html</p>