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()
|
|
|
|
setting_expose_date = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
|
|
|
setting_close_date = formencode.validators.UnicodeString(strip=True, not_empty=True)
|
|
|
|
|
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)
|
|
|
|
|