S
S
Safronov_Alexei2020-07-10 11:19:41
Django
Safronov_Alexei, 2020-07-10 11:19:41

How to pull input'a value in Django without passing it to view?

Hi Habr!
In general, I have a task, I need to get a number from input and use it to display django elements.
That is, something like this, let's say the user entered a number into the input, and based on these value, I should display the elements<input value="123" />

{% if value == 3  %}
{{ form.some_field }}
{% endif %}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-07-10
@bacon

Django will not help here, it works on the server, what you want is done by js on the client

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question