title: How to convert string to uppercase / lowercase in Jinja2?
body: <p>I am trying to convert to upper case a string in a Jinja template I am working on.</p>
  
  <p>In the <a href="http://jinja.pocoo.org/docs/templates/" rel="noreferrer">template documentation</a>, I read:</p>
  
  <pre><code>upper(s)
      Convert a value to uppercase.
  </code></pre>
  
  <p>So I wrote this code:</p>
  
  <pre><code>{% if student.department == "Academy" %}
      Academy
  {% elif  upper(student.department) != "MATHS DEPARTMENT" %}
      Maths department
  {% endif %}
  </code></pre>
  
  <p>But I am getting this error:</p>
  
  <pre><code>UndefinedError: 'upper' is undefined
  </code></pre>
  
  <p>So, how do you convert a string to uppercase in Jinja2?</p>