From cd394a246aa32e5ce15b0643203b7bfdeb703eb6 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 17 Dec 2006 19:04:03 +0000 Subject: Fixed #3153 -- newforms 'label' argument now can contain wacky characters. Thanks, dswistowski git-svn-id: http://code.djangoproject.com/svn/django/trunk@4223 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py index 058a3d8958..474d4a20ae 100644 --- a/tests/regressiontests/forms/tests.py +++ b/tests/regressiontests/forms/tests.py @@ -2062,6 +2062,14 @@ underscores converted to spaces, and the initial letter capitalized.
  • Password1:
  • Password (again):
  • +A label can be a Unicode object or a bytestring with special characters. +>>> class UserRegistration(Form): +... username = CharField(max_length=10, label='ŠĐĆŽćžšđ') +... password = CharField(widget=PasswordInput, label=u'\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111') +>>> p = UserRegistration(auto_id=False) +>>> p.as_ul() +u'
  • \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111:
  • \n
  • \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111:
  • ' + # Forms with prefixes ######################################################### Sometimes it's necessary to have multiple forms display on the same HTML page, -- cgit v1.3