codekasten/wortschlucker/src/forms.py

20 lines
897 B
Python
Raw Normal View History

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)
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)
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
class SubmitForm(formencode.Schema):
submitter = formencode.validators.UnicodeString(strip=True, not_empty=True)
content = formencode.validators.UnicodeString(strip=True, not_empty=True)