Szaijan 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.

Where are you seeing this?

I think you are confusing what gets stored on disk with a human readable 
version 
of the value.

Good chance that both store a 00000001 for true, and even that is a human 
readable version made up of 8 chars :)

> 
> 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.

I have flipped between sqlite, MySql and Postgresql with no such problems.

Carl K

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to