I did a bit of playing around and found the same as you did.
I think the bottom line is that a boolean field of any type can only
realistically hold two values. The NullBoolean must only be a workaround
to support various form logic.
If you truly need a third value then an IntegerField is pro
yes.
On Mar 16, 2012 8:07 PM, "Mike Dewhirst" wrote:
> On 17/03/2012 11:02am, Ben wrote:
>
>> I have a NullBooleanField that I would like to show up in my admin
>> interface as radio buttons with unknown selected by default.
>>
>> # I have the following simplified files
>>
>> ## models.py ##
>> c
On 17/03/2012 11:02am, Ben wrote:
I have a NullBooleanField that I would like to show up in my admin
interface as radio buttons with unknown selected by default.
# I have the following simplified files
## models.py ##
class Value(models.Model):
presence = models.NullBooleanField(default=Fa
I have a NullBooleanField that I would like to show up in my admin
interface as radio buttons with unknown selected by default.
# I have the following simplified files
## models.py ##
class Value(models.Model):
presence = models.NullBooleanField(default=False)
## admin.py ##
PRESENCE_CHOICES
4 matches
Mail list logo