title: Passing a variable to python using Ajax method
body: <p>I want to pass a variable using Ajax from a JS function to a python function in my Django project.
  I am able to call the python function. Using the ajax method, I know this because the print function in the python function runs.
  However how to I pass my variable through this ajax call? I just want to pass the local variable so it can be printed by the python function.</p>
  <p><strong>JS</strong></p>
  <pre><code>function calling (){
      var local = 25
      
      $.ajax({
          type:'GET',
          url:'printsome/',
          success: function(response){
              console.log('success');
              console.log(local);
          },
          error: function (response){
              console.log('error');
          }
      });
  
  }
  </code></pre>
  <p><strong>python</strong></p>
  <pre><code>def print_some(request):
      from django.http import JsonResponse
      print('this python function was called')
      return JsonResponse({})
  </code></pre>