title: How send more than 1 image from my views.py function to my template?
body: <p>In my views.py, i create 2 subplot and send the plot(of these 2 subplot) to my template in order to display it. 
  I would like to send my 2 subgraphs separately to my template in order to display them in different places in my templates, but I can't do it. 
  here my views.py:</p>
  
  <pre><code>def Cdr3Results(request):
    t1 = np.arange(0.0, 5.0, 0.1)
    t2 = np.arange(0.0, 5.0, 0.02)
  
    plt.subplot(211)
    plt.plot(t1, np.exp(-t1) * np.cos(2 * np.pi * t1), "bo")
    plt.plot(t2, np.exp(-t2) * np.cos(2 * np.pi * t2), "k")
  
    plt.subplot(212)
    plt.plot(t2, np.cos(2 * np.pi * t2), "r--")
  
    fig = plt.gcf()
    buf = io.BytesIO()
    fig.savefig(buf, format='PNG', bbox_inches='tight')
    buf.seek(0)
    string = base64.b64encode(buf.read())
    uri = parse.quote(string)
    return render(request, 'data/cdr3Results.html', {'data': uri})
  </code></pre>
  
  <p>here is how i display the plot of these 2 subpot in my template file:</p>
  
  <pre><code>&lt;img src = "data:image/png;base64,{{ data }}" alt="" height="500" width="600"&gt;
  </code></pre>
  
  <p>and here the 2 plots: <a href="https://i.stack.imgur.com/tUuLO.jpg" rel="nofollow noreferrer">picture of the plots</a></p>
  
  <p>All that i need is to send these 2 plot in 2 differents object of my dictionnary that i send to my template. Could someone please help me please, i have been trying for several days.</p>