Thanks for the answer Adrian. But let me say this:

- BooleanFields _are_ currently allowed to have "choices" parameter, as
I can see from my admin interface and docs (svn ~ rev1580). And they
behave differently from other Fields.
- Boolean has obviously only two choices, but if I want to force the
user (in admin interface I mean) to express explicitly a choice between
True of False, then a checkbox is not enough. If I have a checkbox
there are only two states and so a default value is expressed (False as
django checkbox default, or True if a say default=True): in short,
using a checkbox can't force the user to choose True of False. You need
at least a three-state system to do that.

As you previously told me, there is (at least) a solution to force a
user to select explicitly one of two values, like:
choice = meta.CharField(maxlength=1, choices=(('', '----'), ('T',
'True'), ('F', 'False')), blank=False)
Anyway I'd prefer to use BooleanField instead of CharField, since
"choices" is available and  since I'd like not to convert every
'choice' call to booleans in apps code.

So back to my original question (Bug of Feature?), I'm studying Django
code to understand how can I improve BooelanField to handle choices as
desired. But I'm a newbie and if you definitely consider that as a
feature, It's better me to stop now and spend time on other things of
my long todo list :)

Thanks again,

Emanuele

Reply via email to