Django

Code

Show
Ignore:
Timestamp:
08/31/08 06:39:06 (4 months ago)
Author:
mtredinnick
Message:

Fixed #5216 -- Fixed a case of a string not being a unicode string.
Thanks to Vadim Fint for the test case.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/forms/regressions.py

    r7971 r8761  
    3434u'<p><label for="id_username">Nazwa u\u017cytkownika:</label> <input id="id_username" type="text" name="username" maxlength="10" /></p>' 
    3535>>> deactivate() 
     36 
     37There was some problems with form translations in #5216 
     38>>> class SomeForm(Form): 
     39...     field_1 = CharField(max_length=10, label=ugettext_lazy('field_1')) 
     40...     field_2 = CharField(max_length=10, label=ugettext_lazy('field_2'), widget=TextInput(attrs={'id': 'field_2_id'})) 
     41>>> f = SomeForm() 
     42>>> print f['field_1'].label_tag() 
     43<label for="id_field_1">field_1</label> 
     44>>> print f['field_2'].label_tag() 
     45<label for="field_2_id">field_2</label> 
    3646 
    3747Unicode decoding problems...