2010-04-14 20:03:44 +02:00
|
|
|
import formencode
|
|
|
|
|
|
|
|
class PollForm(formencode.Schema):
|
|
|
|
author = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
|
|
|
title = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
|
|
|
description = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
2010-05-07 04:32:31 +02:00
|
|
|
template = formencode.validators.UnicodeString(strip=True)
|
2010-04-14 20:03:44 +02:00
|
|
|
|
2010-05-08 02:25:51 +02:00
|
|
|
class PollSettingsForm(PollForm):
|
|
|
|
settings = formencode.validators.Set()
|
2010-05-08 17:31:46 +02:00
|
|
|
setting_expose_date = formencode.validators.UnicodeString(strip=True)
|
|
|
|
setting_expose_date_forever = formencode.validators.Set()
|
|
|
|
setting_close_date = formencode.validators.UnicodeString(strip=True)
|
|
|
|
setting_close_date_forever = formencode.validators.Set()
|
2010-05-08 02:25:51 +02:00
|
|
|
|
2010-04-15 13:50:58 +02:00
|
|
|
class SubmitForm(formencode.Schema):
|
|
|
|
submitter = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
|
|
|
content = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
|
|
|
|