You should find that Django's BooleanField understands the difference between the databases and does the right thing.
-- Scott On Thu, May 15, 2008 at 1:57 PM, Szaijan <[EMAIL PROTECTED]> wrote: > > Hi, I developed my first Django app on my mapbook using PostgreSQL and > have recently moved it to a production site which uses MySQL. > PostgreSQL stores boolean values and True and False, just like Python > and JS, while MySQL uses 1 and 0. > > Is there some automated way to get the models to understand this and > present/save boolean values to and from views, or do I need to > override the save and get methods so that they translate 0 to False, 1 > to True, and vice versa? This seems to be a barrier to portability if > I have to hard code DB awareness into my models. > > > -- http://scott.andstuff.org/ | http://truthadorned.org/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---