fixed two typos
--HG--
branch : trunk
diff --git a/jinja2/exceptions.py b/jinja2/exceptions.py
index efa9e89..b4c87da 100644
--- a/jinja2/exceptions.py
+++ b/jinja2/exceptions.py
@@ -30,7 +30,7 @@
"""Raised to tell the user that there is a problem with the template."""
def __init__(self, message, lineno, name):
- TEmplateError.__init__(self, '%s (line %s)' % (message, lineno))
+ TemplateError.__init__(self, '%s (line %s)' % (message, lineno))
self.message = message
self.lineno = lineno
self.name = name
diff --git a/jinja2/filters.py b/jinja2/filters.py
index df1d898..56a2e02 100644
--- a/jinja2/filters.py
+++ b/jinja2/filters.py
@@ -208,7 +208,7 @@
"""
# if the delimiter doesn't have an html representation we check
# if any of the items has. If yes we do a coercion to Markup
- if not hasttr(d, '__html__'):
+ if not hasattr(d, '__html__'):
value = list(value)
do_escape = False
for idx, item in enumerate(value):
diff --git a/jinja2/runtime.py b/jinja2/runtime.py
index 31c17f0..8e407c9 100644
--- a/jinja2/runtime.py
+++ b/jinja2/runtime.py
@@ -301,7 +301,7 @@
return self.__unicode__().encode('utf-8')
def __repr__(self):
- return 'undefined'
+ return 'Undefined'
def __len__(self):
return 0
@@ -329,6 +329,9 @@
class StrictUndefined(Undefined):
- """An undefined that barks on print and iteration."""
+ """An undefined that barks on print and iteration as well as boolean tests.
+ In other words: you can do nothing with it except checking if it's defined
+ using the `defined` test.
+ """
- __iter__ = __unicode__ = __len__ = Undefined._fail_with_error
+ __iter__ = __unicode__ = __len__ = __nonzero__ = Undefined._fail_with_error