I have some django code that prints a BooleanField
it is rendered as True or False, can I change the label to be Agree/Disagree or do I need to write logic for that in the template?
I have some django code that prints a BooleanField
it is rendered as True or False, can I change the label to be Agree/Disagree or do I need to write logic for that in the template?
{{ bool_var|yesno:"Agree,Disagree" }}
You can also provide an additional string for the None case. See the docs for yesno for details.