Loading django/template/__init__.py +4 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ class VariableDoesNotExist(Exception): self.params = params def __str__(self): return self.msg % self.params return unicode(self).encode('utf-8') def __unicode__(self): return self.msg % tuple([force_unicode(p, errors='replace') for p in self.params]) class InvalidTemplateLibrary(Exception): pass Loading django/template/debug.py +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class DebugNodeList(NodeList): raise except Exception, e: from sys import exc_info wrapped = TemplateSyntaxError('Caught an exception while rendering: %s' % e) wrapped = TemplateSyntaxError(u'Caught an exception while rendering: %s' % force_unicode(e, errors='replace')) wrapped.source = node.source wrapped.exc_info = exc_info() raise wrapped Loading Loading
django/template/__init__.py +4 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ class VariableDoesNotExist(Exception): self.params = params def __str__(self): return self.msg % self.params return unicode(self).encode('utf-8') def __unicode__(self): return self.msg % tuple([force_unicode(p, errors='replace') for p in self.params]) class InvalidTemplateLibrary(Exception): pass Loading
django/template/debug.py +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class DebugNodeList(NodeList): raise except Exception, e: from sys import exc_info wrapped = TemplateSyntaxError('Caught an exception while rendering: %s' % e) wrapped = TemplateSyntaxError(u'Caught an exception while rendering: %s' % force_unicode(e, errors='replace')) wrapped.source = node.source wrapped.exc_info = exc_info() raise wrapped Loading