Add render_template method to Api