title: Call a script within a view PYTHON / DJANGO
body: <p>I'm very new in Python and Django or the code in general</p>
  
  <p>I created a view that get value from an html template with javascript. With these values collected i want to run a script that consider these new values</p>
  
  <pre><code>@csrf_exempt
  def register(request):
        type_list=request.POST.get('selected_type').split("&amp;") #array collected from checkboxes
        from_date=request.POST.get('start_date').replace("&amp;","") #date collected
        to_date=request.POST.get('end_date').replace("&amp;","") #date collected
        import transaction.query #script I want to run
        profiling = transactionprofiling.objects.all() #database/model updated with the script
        tmpl = loader.get_template("transaction/index.html")
        cont = {'profiling': profiling}
        return HttpResponse(tmpl.render(cont)) #return the model in the template
  </code></pre>
  
  <p>The definition doesn't work as it doesn't save the value "type_list" "from_date" "to_date"
  I made some research but nothing shows up</p>
  
  <p>thank you in advance for your help !</p>