KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Given I have two variables {{ profile }} with a value "test" and {{ element.author }} again with the value "test". In jinja2 when I try to compare them using an if, nothing shows up. I do the comparison as follows: {% if profile == element.author %} {{ profile }} and {{ element.author }} are same {% else %} {{ profile }} and {{ element.author }} are **not** same {% endif %} I get the output test and test are not same Whats wrong, how can I compare?
Tags (comma-separated)
Save Edits
Cancel