title: how to call python function and pass arguments when the html button is clicked?
body: <p>I displayed the data's from database </p>
  
  <pre><code>{% extends "layout.html" %}
  {% block content %}
      &lt;article class="media content-section"&gt;
              &lt;div class="table-responsive"&gt;          
                  &lt;div class="table table-striped"&gt;
                      &lt;table&gt;
                          &lt;thead&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;Name&lt;/th&gt;
                                  &lt;th&gt;Phone Number&lt;/th&gt;
                                  &lt;th&gt; Send SMS &lt;/th&gt;
                              &lt;/tr&gt;
                          &lt;/thead&gt;
                          {% for detail in details%}
                          &lt;tbody&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;{{ detail.username }}&lt;/th&gt;
                                  &lt;th&gt;{{ detail.phonenumber }}&lt;/th&gt;
                                  &lt;th&gt;&lt;button type="button" class="btn btn-success" onclick="'{{ url_for('sendsms', phonenumber = detail.phonenumber)}}'"&gt;Send Request&lt;/button&gt;&lt;/th&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  {% endfor %}
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/article&gt;
  {% endblock content %}
  </code></pre>
  
  <p>HOW TO CALL THE FUNCTION AND PASS THE PHONE NUMBER WHEN THE BUTTON IS CLICKED?</p>
  
  <p>When i pressed that button the sendsms function should called and the phonenumber should passed to this function.</p>
  
  <p>My Route is</p>
  
  <pre><code>def sendsms(phonenumber):
          account_sid = '************************'
          auth_token = '*************************'
          client = Client(account_sid, auth_token)
  
          message = client.messages.create(
                                    from_= current_user.username,
                                    body='i need immediately'
                                    to= phonenumber)
  
          print(message.sid)
  </code></pre>