Booleanfield in Admin/ shows wrong data (Django 1.8)

25 views
Skip to first unread message

Uwe Küllmar

unread,
May 18, 2016, 6:05:13 AM5/18/16
to Django users
Hello,

I installed a new Server with DB2/LINUXX8664 10.5.7, Django 1.8.13, ibm_db 2.0.7 and  ibm_db_django 1.0.9.2. 
After restoring my database on the  new system (source was also db2 with django 1.7) I have the problem that the check boxes in the admin area shows wrong data. All Check boxes are selected and ignore the values from the database.

If I query the data in the django shell I got 1 and 0 instead of  True and False  (Booleanfields)
To except errors in my code I have created a fresh  django project and I see the same issue.



Python 2.7.11+ (default, Apr 17 2016, 14:00:29) 
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from polls.models import *
>>> for  i  in Dummy.objects.all():
...  print i.isboo ,  i.noboo
... 
1 0
1 1
0 0

from the models 

class Dummy(models.Model):
        isboo = models.BooleanField(default=True)
        noboo = models.BooleanField(default=False)


Regards,
             Uwe 
Reply all
Reply to author
Forward
0 new messages