title: How to store tables using jquery ajax django
body: <p>I have written a model named tablestoreajax. It contains name and age fields. I want to store this table field values using ajax but without using json. Am new to django.
  models.py</p>
  
  <pre><code>class tablestoreajax(models.Model):
      name=models.CharField(max_length=20)
      age=models.IntegerField(default=0)
  </code></pre>
  
  <p>tablestore.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
      $('#form1').on('submit',function(){
          var name=$('#id1').val()
          var age=$('#id2').val()
           var dataString = {name:name,age:age};
      $.ajax({
          type:'GET',
          data:dataString,
          url:'/ajaxdisplay/',
          success:function(data) {
          alert(data);
      }
    });
      });
  
      });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  name&lt;input type="text" id="id1" name="name1"&gt;
  age&lt;input type="text" id="id2" name="age1"&gt;
  &lt;input type ="submit" id="sub" value="save"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I don't know how to write my views with get method. How to proceed? I need your help</p>