title: Ajax not appending HttpResponse from Django
body: <p>The aim of my program is to take input from html page, send it to Django so the text turns upper case, and return a response so the page can display the uppercased text. There is no update to the page.</p>
  
  <p><strong>Code on the html:</strong></p>
  
  <pre><code>    &lt;script&gt;
      $("form").submit(function(e){
          e.preventDefault();
          val = $("#input").val();
          $.ajax({
              url: "{% url 'upper' %}",
              data: {'input':val},
              success: function(data){
                  $('#result').append(data);
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Django's views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse
  
  def index(request):
      return render(request, "index.html", context = {"text": 'This is from Django'})
  
  
  def upper(request):
      vals = request.GET.get('input')
      print(vals)
      return HttpResponse(vals.upper)
  </code></pre>