python - Javascript to Django views.py? -
this may sound simple, how send data javascript array in index.html template views.py? when user clicks "recommend" button, code calls function accesses database , prints name on template. def index(request): if(request.get.get('recommend')): sql_handler.recfunc() context['name'] = sql_handler.name return render(request, 'polls/index.html', context) i have array of checkbox values in javascript calculated after user presses "recommend". want send index view , use parameter function. so: def index(request): if(request.get.get('recommend')): sql_handler.recommend() context['name'] = sql_handler.name //something?? tags = check_array_javascript context['tags'] = tags return render(request, 'polls/index.html', context) how can this? i've been searching similar questions, i'm new django , web development in general...