Ticket #5884: 5884.diff
File 5884.diff, 1.2 KB (added by , 17 years ago) |
---|
-
django/template/__init__.py
125 125 class VariableDoesNotExist(Exception): 126 126 127 127 def __init__(self, msg, params=()): 128 self.msg = msg129 self.params = params128 self.msg = force_unicode(msg) 129 self.params = tuple([force_unicode(x) for x in params]) 130 130 131 def __ str__(self):131 def __unicode__(self): 132 132 return self.msg % self.params 133 133 134 134 class InvalidTemplateLibrary(Exception): -
django/template/debug.py
75 75 raise 76 76 except Exception, e: 77 77 from sys import exc_info 78 wrapped = TemplateSyntaxError( 'Caught an exception while rendering: %s' % e)78 wrapped = TemplateSyntaxError(u'Caught an exception while rendering: %s' % e) 79 79 wrapped.source = node.source 80 80 wrapped.exc_info = exc_info() 81 81 raise wrapped