diff --git a/django/template/__init__.py b/django/template/__init__.py index dafa0696f74..7a1c85174c5 100644 --- a/django/template/__init__.py +++ b/django/template/__init__.py @@ -159,7 +159,7 @@ class Template(object): template_string = smart_unicode(template_string) except UnicodeDecodeError: raise TemplateEncodingError("Templates can only be constructed from unicode or UTF-8 strings.") - if settings.TEMPLATE_DEBUG and origin == None: + if settings.TEMPLATE_DEBUG and origin is None: origin = StringOrigin(template_string) # Could do some crazy stack-frame stuff to record where this string # came from...