﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12333	CheckboxInput don't work with 0 and 1 value (considerd as Booleans)	alexis_m	nobody	"Hello, 

I think I've discovered an unwanted behavior in the ""render"" method of the CheckboxInput class, or maybe I don't understand how it's designed to be used.

When using the render() method, with a value of 0 or 1, the verification process, made by the following code:

{{{
if value not in ('', True, False, None):
}}}

prevents the ""value"" attribute to be shown.

It's mainly because 1 and 0 are considéred equals to True and False.

Here is my proposition to solve this:

{{{
if (value not in ('', None)) and str(value) not in ('False', 'True'):
}}}

Another option can be to use force_unicode from from django.utils.encoding on incoming values.

Thanks
"		closed	Forms	dev		invalid	CheckboxInput Boolean		Unreviewed	1	0	0	0	0	0
