From 0bf5bead5cac81703b1d2d45858cd8cca6a52d58 Mon Sep 17 00:00:00 2001 From: lars Date: Tue, 4 May 2010 17:27:06 +0000 Subject: [PATCH] use unicode for strings in the database (except for the hashes - they can be part of the URL) * this fixes the issue with non-ascii input strings --- wortschlucker/src/wortschlucker.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wortschlucker/src/wortschlucker.py b/wortschlucker/src/wortschlucker.py index 96591f1..b405612 100755 --- a/wortschlucker/src/wortschlucker.py +++ b/wortschlucker/src/wortschlucker.py @@ -37,8 +37,8 @@ POLL_SETTINGS = { } class ContentSubmission(sqlobject.SQLObject): - submitter = sqlobject.StringCol() - content = sqlobject.StringCol() + submitter = sqlobject.UnicodeCol() + content = sqlobject.UnicodeCol() poll_id = sqlobject.ForeignKey("Poll") timestamp_creation = sqlobject.DateTimeCol() @@ -60,16 +60,16 @@ class ContentSubmission(sqlobject.SQLObject): class PollSetting(sqlobject.SQLObject): poll_id = sqlobject.ForeignKey("Poll") - key = sqlobject.StringCol() - value = sqlobject.StringCol() + key = sqlobject.UnicodeCol() + value = sqlobject.UnicodeCol() class Poll(sqlobject.SQLObject): - author = sqlobject.StringCol() + author = sqlobject.UnicodeCol() hash_key = sqlobject.StringCol() admin_hash_key = sqlobject.StringCol() - title = sqlobject.StringCol() - description = sqlobject.StringCol() + title = sqlobject.UnicodeCol() + description = sqlobject.UnicodeCol() timestamp_creation = sqlobject.DateTimeCol() def get_settings(self):