title: Django: How to access array index in template using variable
body: <p>I have array, lets say it:</p>
  
  <pre><code>str_types = ("open", "closed", "extend", "cancel")
  </code></pre>
  
  <p>Also I've some table. Which have int field named "type", contains number from 1 - 4. If field value is 1, It must print "open", if value equals 2, I must print "closed" etc.</p>
  
  <p>So in template:</p>
  
  <pre><code>{% for a in ticket %}
  &lt;div&gt;{{ str_types.a.types }}&lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>Result is blank. How to access that str_types array's index?</p>