title: Django - Setting variable inside a template (or calling IF statement where argument is a function)
body: <p>I have a (template tag - simple_tag) function, which takes 1 argument (and context) and returns a string.
  So calling <code>{% myfunction var1 %}</code> returns a string (depended on var1).</p>
  
  <p>Now I want to use this inside a if statement, something like: <code>{% if myfunction var1 == 'some string' %}</code>.
  Obviously that doesn't work, so I have tried to firstly save returned string to a variable and then use it in if statement. </p>
  
  <p>But <code>{% myfunction var1 as var2 %}</code> doesn't work because it treats "as var2" as a second function argument and I get the "received too many positional arguments" error.</p>
  
  <p>I have tried the "with" statement also, but it doesn't work either...</p>
  
  <p>So how can I save the function return value to a variable OR how can I directly use a function inside if statement ??</p>