Mercurial > genshi > mirror
annotate examples/tutorial/geddit/form.py @ 688:d8571da25bc5 trunk
The `Stream.render` now accepts an optional `out` parameter that can be used to pass in a writable file-like object to use for assembling the output, instead of building a big string and returning it.
author | cmlenz |
---|---|
date | Wed, 12 Mar 2008 20:46:34 +0000 |
parents | 756e7418e10c |
children |
rev | line source |
---|---|
611
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
1 from formencode import Schema, validators |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
2 |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
3 |
619
756e7418e10c
GenshiTutorial: various updates to sync with wiki page.
cmlenz
parents:
611
diff
changeset
|
4 class LinkForm(Schema): |
611
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
5 username = validators.UnicodeString(not_empty=True) |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
6 url = validators.URL(not_empty=True, add_http=True, check_exists=False) |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
7 title = validators.UnicodeString(not_empty=True) |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
8 |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
9 |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
10 class CommentForm(Schema): |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
11 username = validators.UnicodeString(not_empty=True) |
236c351928a2
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
12 content = validators.UnicodeString(not_empty=True) |