Quantcast
Channel: User Bazinga - Stack Overflow
Viewing all articles
Browse latest Browse all 37

Using variables in jquery in Django template filter

$
0
0

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 all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>