django template boolean variable shows as 0 but is considred True. Why?
They are treated as strings ('0' string and '1' string, not 0 integer and 1 integer).
If you go to your command-line Python and call bool(0) or bool(False), you will get False, but if you call bool('0'), you will get True.
I have template variables that correctly can be displayed with {{ myclass.myvariable }} as either 1 or 0.
But when I use them in the if statement  {% if myclass.myvariable %} they always are considered to be True, even when the value is 0. 
The variables are 1-character charfield choices in my model, stored as 0 or 1, and the django template system chapter-4 claims that:
'In Python, the empty list ([]), tuple (()), dictionary ({}), string (''), zero (0), and the special object None are False in a Boolean context. Everything else is True.'
I didn't use BooleanField in the model because I also have choice values 2, 3, 4...
What could be the issue here?