Allow formats in templates to return Q promises