title: Call Javascript function when HTML table finishes loading
body: <p>I am loading an HTML table through Django:</p>
  
  <pre><code>{% for  m in pays %}
                  &lt;tr&gt;
                      &lt;td&gt;&lt;center&gt;{{ m.bid }}&lt;/center&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;center&gt;{{ m.pDate }}&lt;/center&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;center&gt;{{ m.punt }}&lt;/center&gt;&lt;/td&gt;
  
                  &lt;/tr&gt;
  </code></pre>
  
  <p>After this table has the necessary rows filled up. I want to call a function that makes this a datatable.</p>
  
  <pre><code>function inittable(){
           $('#pt').DataTable();
  }
  </code></pre>
  
  <p>Right now, I am initalizing it when the form submits. This causes it to try and load on an empty table. I only want to initalize after table loads</p>