diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-02-19 23:43:14 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-02-19 23:43:14 +0000 |
| commit | 7cb7541971b2e080d1288e24e5705d296b11a021 (patch) | |
| tree | bf9c23867766fe9227090ce8024d2c92d6ef5acf /tests | |
| parent | babc0793e3dcfcc976ae44df4c67c7eed627655c (diff) | |
Improved newforms to handle wacky characters in Field help_text
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/forms/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py index c53729da46..2e34111b3e 100644 --- a/tests/regressiontests/forms/tests.py +++ b/tests/regressiontests/forms/tests.py @@ -2698,6 +2698,13 @@ purposes, though. <li>Username: <input type="text" name="username" maxlength="10" /> e.g., user@example.com</li> <li>Password: <input type="password" name="password" /><input type="hidden" name="next" value="/" /></li> +Help text can include arbitrary Unicode characters. +>>> class UserRegistration(Form): +... username = CharField(max_length=10, help_text='ŠĐĆŽćžšđ') +>>> p = UserRegistration(auto_id=False) +>>> p.as_ul() +u'<li>Username: <input type="text" name="username" maxlength="10" /> \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111</li>' + # Subclassing forms ########################################################### You can subclass a Form to add fields. The resulting form subclass will have |
