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:
parent
5355c8a34b
commit
0bf5bead5c
1 changed files with 7 additions and 7 deletions
|
@ -37,8 +37,8 @@ POLL_SETTINGS = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContentSubmission(sqlobject.SQLObject):
|
class ContentSubmission(sqlobject.SQLObject):
|
||||||
submitter = sqlobject.StringCol()
|
submitter = sqlobject.UnicodeCol()
|
||||||
content = sqlobject.StringCol()
|
content = sqlobject.UnicodeCol()
|
||||||
poll_id = sqlobject.ForeignKey("Poll")
|
poll_id = sqlobject.ForeignKey("Poll")
|
||||||
timestamp_creation = sqlobject.DateTimeCol()
|
timestamp_creation = sqlobject.DateTimeCol()
|
||||||
|
|
||||||
|
@ -60,16 +60,16 @@ class ContentSubmission(sqlobject.SQLObject):
|
||||||
|
|
||||||
class PollSetting(sqlobject.SQLObject):
|
class PollSetting(sqlobject.SQLObject):
|
||||||
poll_id = sqlobject.ForeignKey("Poll")
|
poll_id = sqlobject.ForeignKey("Poll")
|
||||||
key = sqlobject.StringCol()
|
key = sqlobject.UnicodeCol()
|
||||||
value = sqlobject.StringCol()
|
value = sqlobject.UnicodeCol()
|
||||||
|
|
||||||
|
|
||||||
class Poll(sqlobject.SQLObject):
|
class Poll(sqlobject.SQLObject):
|
||||||
author = sqlobject.StringCol()
|
author = sqlobject.UnicodeCol()
|
||||||
hash_key = sqlobject.StringCol()
|
hash_key = sqlobject.StringCol()
|
||||||
admin_hash_key = sqlobject.StringCol()
|
admin_hash_key = sqlobject.StringCol()
|
||||||
title = sqlobject.StringCol()
|
title = sqlobject.UnicodeCol()
|
||||||
description = sqlobject.StringCol()
|
description = sqlobject.UnicodeCol()
|
||||||
timestamp_creation = sqlobject.DateTimeCol()
|
timestamp_creation = sqlobject.DateTimeCol()
|
||||||
|
|
||||||
def get_settings(self):
|
def get_settings(self):
|
||||||
|
|
Loading…
Reference in a new issue