title: it does not save updated value to database table ajax
body: <p>===html===
  one project has many expenses, and my dropdown display all expenses of that project. It will also allow user to select different value from dropdown list and then hit update button. it does not give any error however it does not save selected value from dropdown list to database.
  any help will be deeply appreciated.</p>
  
  <pre><code>&lt;select id="select_dropdown"&gt;
      {% if project.id and emp.id %}
          {% for expense in emp.expense_set.all %}
              {% if expense.city %}
                  &lt;option value="{{expense.id}}" selected="selected"&gt;{{expense.expense_type}}&lt;/option&gt;
              {% else %}
                  &lt;option value="{{expense.id}}"&gt;{{expense.expense_type}}&lt;/option&gt;
              {% endif %}
          {% endfor %}
      {% endif %}
  &lt;/select&gt; 
  </code></pre>
  
  <p>====js=======</p>
  
  <pre><code>        $("#save_change").click(function(e) {
                  e.preventDefault();
                  console.log("update fucntion is working!");
                  var value = $("#select_dropdown").find(":selected").val();
                  var text = $("#select_dropdown option:selected").text();
                  var project_id = $("#project_id").val();
                  var emp_id = $("#emp_id").val();
                  console.log(emp_id);
                  $.ajax({
                          url: "{% url 'update_form' %}",
                          //url: "/ajax/update_form/",
                          method: "POST",
                          data: {
                                  "value": value,
                                  "text": text,
                                  "project_id": project_id,
                                  "emp_id": emp_id,
                                  csrfmiddlewaretoken: '{{ csrf_token }}',
                          },
                          dataType: "json",
                          success: function(data){
                                  console.log("success");
                                  console.log(data);
                          },
                          error: function(error_data){
                                  console.log("error")
                                  console.log(error_data)
                          }
  
                  });
                  return false;
  </code></pre>
  
  <p>===views.py===</p>
  
  <pre><code>@csrf_exempt
  def update_form(request):
          if request.method == "POST" and request.is_ajax():
                  expense_id = request.POST.get('value')
                  expense_type = request.POST.get('text')
                  project_id = request.POST.get('project_id')
                  emp_id = request.POST.get('emp_id')
                  project_id = request.POST.get('project_id')
  
                  for exp in expense:
                          exp.expense_type = expense_type
                          exp.save()
  
                  data = serializers.serialize("json", expense)
  
          return HttpResponse(data, content_type="application/json")
  </code></pre>