The sort filter is provided by Jinja2 which uses Python’s sorted that does not know how to sort versions (which versioning scheme?). You would have to provide a sorting function to sorted and in order to do that you would have to implement your own filter since provided sort does not allow that functionality.