summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-06-08 05:00:13 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-06-08 05:00:13 +0000
commit2abfd5dd586c4f6fb619de561b2194687021e256 (patch)
tree51f32f85db5f5fae270924bdf93d2ff3072fc9c2 /django/template
parent5edd1335b2ae3530bab124b8e9cfb6928a975088 (diff)
Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/template')
-rw-r--r--django/template/__init__.py8
-rw-r--r--django/template/context.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py
index 656cffd4b6..028d23f251 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -134,7 +134,7 @@ class StringOrigin(Origin):
def reload(self):
return self.source
-class Template:
+class Template(object):
def __init__(self, template_string, origin=None):
"Compilation stage"
if settings.TEMPLATE_DEBUG and origin == None:
@@ -158,7 +158,7 @@ def compile_string(template_string, origin):
parser = parser_factory(lexer.tokenize())
return parser.parse()
-class Token:
+class Token(object):
def __init__(self, token_type, contents):
"The token_type must be TOKEN_TEXT, TOKEN_VAR or TOKEN_BLOCK"
self.token_type, self.contents = token_type, contents
@@ -376,7 +376,7 @@ def parser_factory(*args, **kwargs):
else:
return Parser(*args, **kwargs)
-class TokenParser:
+class TokenParser(object):
"""
Subclass this and implement the top() method to parse a template line. When
instantiating the parser, pass in the line from the Django template parser.
@@ -654,7 +654,7 @@ def resolve_variable(path, context):
del bits[0]
return current
-class Node:
+class Node(object):
def render(self, context):
"Return the node rendered as a string"
pass
diff --git a/django/template/context.py b/django/template/context.py
index f50fb07598..44a97f95a8 100644
--- a/django/template/context.py
+++ b/django/template/context.py
@@ -7,7 +7,7 @@ class ContextPopException(Exception):
"pop() has been called more times than push()"
pass
-class Context:
+class Context(object):
"A stack container for variable context"
def __init__(self, dict_=None):
dict_ = dict_ or {}