Mercurial > genshi > genshi-test
annotate examples/tutorial/geddit/form.py @ 788:09531799bac2
Change `Translator` class to accept either a `gettext`-style function, or an object compatible with the `NullTranslations` / `GNUTranslations` interface.
author | cmlenz |
---|---|
date | Sun, 10 Aug 2008 20:32:13 +0000 |
parents | 71d3edd302ae |
children |
rev | line source |
---|---|
611
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
1 from formencode import Schema, validators |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
2 |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
3 |
619
71d3edd302ae
GenshiTutorial: various updates to sync with wiki page.
cmlenz
parents:
611
diff
changeset
|
4 class LinkForm(Schema): |
611
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
5 username = validators.UnicodeString(not_empty=True) |
16b1be35c265
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) |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
7 title = validators.UnicodeString(not_empty=True) |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
8 |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
9 |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
10 class CommentForm(Schema): |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
11 username = validators.UnicodeString(not_empty=True) |
16b1be35c265
Add current code for GenshiTutorial to the `examples` directory.
cmlenz
parents:
diff
changeset
|
12 content = validators.UnicodeString(not_empty=True) |