Reputation: 23
I am working on a little flask
project and in my javascript script I have a variable which works as a counter.
When I receive a POST request I would like my python
script to extract this counter variable.
I tried to set a jinja2
variable by doing {%set extractor_var = js_counter%}
but it seems to be impossible to use a javascript variable inside a jinja2
template.
Can anyone lead me to another solution?
Upvotes: 0
Views: 269
Reputation: 13549
That doesn't make sense!
Flask/Jinja can't read from javascript vars.
However, (as you said it is a POST request) you could:
Upvotes: 1