title: How to create a modal in django without Jquery
body: <p>Currently, I have created functionality to display some information regarding one of my models in HTML, in the spirit of succinctness, I would like to present the client information model using a modal pop-up window.</p>
  <p>My main problem is that when the user clicks the view button, I'm getting data from the database and sending it to a view and this is rendered as HTML - I can certainly use Jquery AJAX to pass the data to the server and get a JSON file to construct my form in my main HTML page using bootstrap modal forms, however, is there another more pythonic way to achieve this?</p>
  <p>views.py</p>
  <pre><code>#Receives the client name and gets a queryset that is passed on to the HTML page
  def ind_client_view(request):
      name = request.GET.get('name','')
      firstname,lastname = name.split()
      client = Client.objects.filter(firstname=firstname,lastname=lastname)
      return render(request,'account/leads_list.html',
                    {'client':client})
  
  </code></pre>
  <pre><code>            {% for lead in pag_leads %}
                  &lt;tr&gt;
                      &lt;td&gt;&lt;a href = &quot;{% url 'leads_update' lead.project_id %}&quot;&gt;{{ lead.project_id }}&lt;/a&gt;&lt;/td&gt;
                      &lt;td&gt;{{ lead.agent }}&lt;/td&gt;
                      &lt;td&gt;{{ lead.company }}&lt;/td&gt;
                      &lt;td&gt;&lt;a href = &quot;{% url 'ind_client_view' %}?name={{ lead.point_of_contact }}&quot;
                              class=&quot;btn btn-primary btn-sm&quot;&gt;{{ lead.point_of_contact }}&lt;/a&gt;&lt;/td&gt;
                      &lt;td&gt;{{ lead.country }}&lt;/td&gt;
                      &lt;td&gt;{{ lead.services }}&lt;/td&gt;
                      &lt;td&gt;{{ lead.expected_licenses }}&lt;/td&gt;
                      &lt;td&gt;{{ lead.expected_revenue }}&lt;/td&gt;
                      &lt;td&gt;{{ lead.estimated_closing_date }}&lt;/td&gt;
                      &lt;td&gt;
                          {% if lead.age_in_days &lt;= 30 %}
                              &lt;b style=&quot;color:Red&quot;&gt;{{ lead.age_in_days }}&lt;/b&gt;
                          {% else %}
                              {{ lead.age_in_days }}
                          {% endif %}
                      &lt;/td&gt;
                      &lt;td&gt;{{ lead.status }}&lt;/td&gt;
                      &lt;td&gt;
                          &lt;a href = &quot;{% url 'close_lead' %}?project_id={{ lead.project_id }}&quot;
                              class=&quot;btn btn-primary btn-sm&quot;&gt; Close &lt;/a&gt;
                          &lt;a href = &quot;{% url 'status_idle' %}?lead_id={{ lead.project_id }}&amp;lead_status=Idle&quot;
                              class=&quot;btn btn-primary btn-sm&quot;
                             onclick=&quot;return confirm('Are you sure you want to change the status?')&quot;&gt; Idle &lt;/a&gt;
                          &lt;a href = &quot;{% url 'status_idle' %}?lead_id={{ lead.project_id }}&amp;lead_status=Canceled&quot;
                              class=&quot;btn btn-primary btn-sm&quot;
                             onclick=&quot;return confirm('Are you sure you want to change the status?')&quot;&gt; Cancel &lt;/a&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              {% endfor %}
  </code></pre>
  <pre><code>
  
  
  
  
  
  
  
  </code></pre>