Django

Code

Show
Ignore:
Timestamp:
10/03/07 20:55:51 (1 year ago)
Author:
mtredinnick
Message:

Fixed #5641 -- Handle lazy translations correctly when used as default arguments. Thanks, permon.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/i18n/models.py

    r5876 r6453  
     1from django.db import models 
     2from django.utils.translation import ugettext_lazy as _ 
     3 
     4class TestModel(models.Model): 
     5    text = models.CharField(max_length=10, default=_('Anything')) 
     6 
     7__test__ = {'API_TESTS': ''' 
     8>>> tm = TestModel() 
     9>>> tm.save() 
     10''' 
     11} 
     12