Quantcast
Viewing latest article 27
Browse Latest Browse All 37

Using variables in jquery in Django template filter

I want to be able to get data using Jquery then apply a Django template filter on it. I am using jinja2 for the template.

I have a click event as to:

$('#get_name').click(function(event){    var name = $(this).val();    alert('{{ name|custom_filter}}'); - here is where it is producing the error.});

I have tried appending it as '{{ "+ name +"|custom_filter}}' but still produces an error.


Viewing latest article 27
Browse Latest Browse All 37

Trending Articles