root/Python/geddit/form.py
| Revision 28, 417 bytes (checked in by davbo, 20 months ago) |
|---|
| Line | |
|---|---|
| 1 | # -*- coding: utf-8 -*- |
| 2 | from formencode import Schema, validators |
| 3 | |
| 4 | |
| 5 | class LinkForm(Schema): |
| 6 | username = validators.UnicodeString(not_empty=True) |
| 7 | url = validators.URL(not_empty=True, add_http=True, check_exists=False) |
| 8 | title = validators.UnicodeString(not_empty=True) |
| 9 | |
| 10 | |
| 11 | class CommentForm(Schema): |
| 12 | username = validators.UnicodeString(not_empty=True) |
| 13 | content = validators.UnicodeString(not_empty=True) |
Note: See TracBrowser
for help on using the browser.
