summaryrefslogtreecommitdiff
path: root/django/templatetags
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2017-01-19 02:39:46 -0500
committerClaude Paroz <claude@2xlibre.net>2017-01-19 08:39:46 +0100
commitcecc079168e8669138728d31611ff3a1e7eb3a9f (patch)
tree2415083d44f84c6f206930fc689a8c0e50a98caa /django/templatetags
parenta5563963397aeee30c32e3c1dab31bfe453ca89f (diff)
Refs #23919 -- Stopped inheriting from object to define new style classes.
Diffstat (limited to 'django/templatetags')
-rw-r--r--django/templatetags/tz.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/templatetags/tz.py b/django/templatetags/tz.py
index 99d391e45d..4769d1e09d 100644
--- a/django/templatetags/tz.py
+++ b/django/templatetags/tz.py
@@ -8,9 +8,9 @@ from django.utils import timezone
register = Library()
-# HACK: datetime is an old-style class, create a new-style equivalent
-# so we can define additional attributes.
-class datetimeobject(datetime, object):
+# HACK: datetime instances cannot be assigned new attributes. Define a subclass
+# in order to define new attributes in do_timezone().
+class datetimeobject(datetime):
pass