Django Template Ternary Operator February 25, 2023 by Tarik You can use the yesno filter: {{ value|yesno:"yeah,no,maybe" }} You can learn more here