My Universe Logo

OpenMCP: Work on Web Interface started

Posted by Jesco Freund at June 8, 2008 2:59 p.m.

Actually, I started work on the web interface some weeks ago, but today I pushed it all into the Subversion repository – and took the opportunity to restructure the repo as long as no tags and branches are set. Of course this is all incomplete, but logging in with a created mailbox (using the Django admin interface) already works :-)

Not so nice: There seems to be an issue using MySQL databases together with Django applications. MySQL (I use 5.0.51a from FreeBSD ports for development) refuses keys larger than 1000 Bytes. Something within the Django Admin Interface seems to collide with this limitation when using utf-8 as default charset (which means 3 bytes per character are used). See MySQL Bug #4541 for details. Hopefully this gets really fixed with 5.0.51b, or I will have to skip MySQL suppport and switch over to PostgreSQL or SQLite.

Update: It wasn't Django, it was me who messed it up. I had built up a many-to-many relation using models.CharField(max_length=255) as primary keys. So what happened? Django always refers to characters and not to bytes. Since MySQL uses 3 Bytes to represent a utf-8 character, the relation table's key got 1530 bytes big which is not accepted by MySQL. For the sake of peace with MySQL, I changed all keys to artificial numeric ones – simply reducing the field lengths was actually something that I could not accept 8-)

No comments | Defined tags for this entry: MySQL, OpenMCP

Comments

No comments