title: how to send Django view response to modal?
body: <p>Im trying to create note detail in modal popup window.</p>
  <p>Here is  the modal invoke <strong>anchor tag</strong></p>
  <pre><code>         &lt;a class=&quot;fa fa-pencil&quot; data-toggle=&quot;modal&quot; href=&quot;{% url 'post_detail_view' %}&quot;  data-id=&quot;{{ todo_item.content }}&quot; data-target=&quot;#modal&quot; title=&quot;edit item&quot; data-tooltip&gt;&lt;/a&gt; 
  </code></pre>
  <p>here is the view function in <strong>views.py</strong>:</p>
  <pre><code>def post_detail_view(request, content):
      all_items1 = TodoItem.objects.get(content=content)
  
      return render(request, 'todo.html', {'all_items1': all_items1})
  </code></pre>
  <p>here is my <strong>urls.py</strong> :</p>
  <pre><code>    path('post_detail_view/&lt;str:content&gt;/', views.post_detail_view, name='post_detail_view'),
  </code></pre>
  <p>This is my modal code in <strong>todo.html</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="modal-dialog" role="document"&gt;
     &lt;div class="modal-content"&gt;
        &lt;form action="/addTodo/" method="post" enctype="multipart/form-data"&gt;
           {% csrf_token %}
           &lt;div class="modal-header"&gt;
              &lt;h5 class="modal-title" id="exampleModalLabe2"&gt;Edit Info&lt;/h5&gt;
              &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
              &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
              &lt;/button&gt;
           &lt;/div&gt;
           &lt;div class="modal-body"&gt;
              {% if all_items1 %}
              &lt;label for="content"&gt;Title :&lt;/label&gt;&lt;br&gt;
              &lt;p&gt;{{ all_items1.content }}&lt;/p&gt;
              &lt;p&gt;{{ all_items1.data }}&lt;/p&gt;
              &lt;input type="text" id='c' name="content" value="{{ all_items1.content }}"/&gt;&lt;br&gt;
              &lt;label for="data"&gt;Description :&lt;/label&gt;&lt;br&gt;
              &lt;textarea id="data" rows="4" cols="50" value=""&gt;{{ all_items1.data }}&lt;/textarea&gt;
              &lt;br&gt;
              &lt;label for="tags"&gt;Tags :&lt;/label&gt;&lt;br&gt;
              &lt;input type="tags" name="tags" value="{{ all_items1.tags }}"/&gt;&lt;br&gt;
              &lt;a href="{{ all_items1.file.url }}"&gt;
              {% load static %}
              &lt;img src="{% static 'ico.png' %}" style="width:30px;height:30px" alt="download"&gt;
              &lt;/a&gt;
              &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
              {% endif %}
           &lt;/div&gt;
           &lt;div class="modal-footer"&gt;
              &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
              &lt;button type="submit" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
           &lt;/div&gt;
        &lt;/form&gt;
     &lt;/div&gt;
     &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>This code is not working. I can see modal is popping up but no data is displayed. I'm still learning Django. Can someone please help.</p>