Answer the question
In order to leave comments, you need to log in
Are there analogues of the __in method in templates?
Let's say I have an array of values and there is a variable with some value
And I need to write a condition in the template, if the array has a match with the variable, then the condition returns True, I can loop through all this and check it, but it's somehow not beautiful
In the models for this there is a __in method
In templates, something close is the length filter, but I need to check the value itself and not the number of characters
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question