title: Django button ajax click
body: <p>I have some HTML that Django is rendering well. I'd like to click a button on the HTML and have that cause an event to fire in the view. </p>
  
  <p>It doesn't look like the button is causing the <code>post</code> to fire. I'm not sure what I'm doing wrong. </p>
  
  <p>This is my <code>views.py</code> code:</p>
  
  <pre><code>def log(request):
    if not request.POST:
      template = loader.get_template('log.html')
      html = template.render(Context())
      return HttpResponse(html)
    print "Post"
  </code></pre>
  
  <p>This is my <code>log.html</code>:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;script type="text/javascript"&gt;
      $("#update_log_button").bind("button", function(){
          $.post("hello");
          return false;
      });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;
      &lt;span&gt;SPHIINX Log&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;textarea cols="2" name="log" rows="25"&gt;&lt;/textarea&gt;
       &lt;input id="update_log_button" name="update_log" type="button" value="Update Log"/&gt;
  &lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>