Django filter for converting the number of seconds into a readable form <p>I have model:</p> <pre><code>class Track(models.Model): artist = models.CharField(max_length=100) title = models.CharField(max_length=100) length = models.PositiveSmallIntegerField() </code></pre> <p>where length is the duration of track in seconds</p> <p>I have template:</p> <pre><code>{% for track in tracks %} {{track.artist}} - {{track.title}} {{track.length}} {% endfor %} </code></pre> <p>How can I convert a length in the readable form, ie 320 seconds should be displayed as 5:20, 3770 as 1:02:50?</p> <p>Forgive sorry for bad english.</p>