Django

Code

Changeset 5446

Show
Ignore:
Timestamp:
06/09/07 09:34:14 (1 year ago)
Author:
mtredinnick
Message:

unicode: Fixed #4495 -- Fixed a used of str() in the "firstof" template tag.
Patch from Ivan Sagalaev.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/django/template/defaulttags.py

    r5444 r5446  
    55from django.template import get_library, Library, InvalidTemplateLibrary 
    66from django.conf import settings 
    7 from django.utils.encoding import smart_str 
     7from django.utils.encoding import smart_str, smart_unicode 
    88import sys 
    99import re 
     
    6060                continue 
    6161            if value: 
    62                 return str(value) 
    63         return '' 
     62                return smart_unicode(value) 
     63        return u'' 
    6464 
    6565class ForNode(Node):