How to Add Custom Labels to a Boolean Field in Django

In this article, we show how to add custom labels to a Boolean Field in Django.
So let's say that you are creating a model (database table) in Django and one or more of the fields is a boolean field.
How can you represent options for the boolean field other than just True and False?
Below is the options that we can use to do this.
When dealing with options in a boolean field, the values can either be True or False.
So these will always have to be in the options list.
However, what the user sees will be the 'Yes' or 'No'.
With the BOOLEAN_OPTIONS variable, the first option of each parenthesis is what gets saved into the model (database). This would be the True and False values seen above.
These always need to be specified for boolean fields, as boolean fields only deal with True or False values.
However, what we can always customize is the second options of each parenthesis.
In our above value, we specify this as 'Yes' and 'No'.
This can be anything else besides 'Yes' and 'No' to 'High' and 'Low' to 'Important' and 'Unimportant' to 'Painful' and 'Painless'.
In the model, we enter into the field with the boolean choices, as shown below.
So this is how we can add custom labels to a boolean field in Django.
Related Resources
How to Randomly Select From or Shuffle a List in Python
