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
This commit is contained in:
lars 2010-05-04 17:27:06 +00:00
parent 5355c8a34b
commit 0bf5bead5c

View file

@ -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):