title: Django/Python: How to cast an integer into the equivalent enum string?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4274243/django-print-choices-value">Django print choices value</a>  </p>
  </blockquote>
  
  
  
  <p>In Django in one of the models I have the following enum:</p>
  
  <pre><code>PRIORITY = (
          ('2',     _(u'High')),
          ('1',   _(u'Medium')),
          ('0',      _(u'Low')),
      )
  
  priority = models.CharField(max_length=1, choices=PRIORITY, default='1')
  </code></pre>
  
  <p>When sending the priority to the template, the value is still in integer, which isn't nice. I would like to show the priority in words rather than digits.</p>
  
  <pre><code>context = Context({'priority':self.priority})
  </code></pre>
  
  <p>Is there a way to translate priority into the actual string without using any if statements before sending it to the template?</p>