Ticket #4495: 4495.diff

File 4495.diff, 1008 bytes (added by Ivan Sagalaev <Maniac@…>, 17 years ago)

Patch

  • django/template/defaulttags.py

     
    44from django.template import TemplateSyntaxError, VariableDoesNotExist, BLOCK_TAG_START, BLOCK_TAG_END, VARIABLE_TAG_START, VARIABLE_TAG_END, SINGLE_BRACE_START, SINGLE_BRACE_END, COMMENT_TAG_START, COMMENT_TAG_END
    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
    99
    1010register = Library()
     
    5858            except VariableDoesNotExist:
    5959                continue
    6060            if value:
    61                 return str(value)
    62         return ''
     61                return smart_unicode(value)
     62        return u''
    6363
    6464class ForNode(Node):
    6565    def __init__(self, loopvar, sequence, reversed, nodelist_loop):
Back to Top