I want to use one custom django filter. It is having 2 variable movpath and projectname. movpath is coming from input type hidden.
{% if movpath|is_path_exist:projectName %}
do something
{% else %}
do something
{% endif %}
Is it possible that we can take input type hidden value into the django template.
The standard way of using templates in Django consists in passing context variables to it. Consequently
So, at some point, you should have
where
movpath
is obtained from the form's hidden field.This way, the value of the hidden field of the form is passed to the context, which is passed to the template during rendering.