From ee7ab1b6e2439f79f3594925a6bf539aabaec8e1 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Wed, 4 Oct 2017 17:26:49 +0200 Subject: [PATCH] Refs #27546 -- Replaced hardcoded class name in ForNode.__repr__(). --- django/template/defaulttags.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index 4e778938dd..797ebce4de 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -143,9 +143,13 @@ class ForNode(Node): def __repr__(self): reversed_text = ' reversed' if self.is_reversed else '' - return "" % \ - (', '.join(self.loopvars), self.sequence, len(self.nodelist_loop), - reversed_text) + return '<%s: for %s in %s, tail_len: %d%s>' % ( + self.__class__.__name__, + ', '.join(self.loopvars), + self.sequence, + len(self.nodelist_loop), + reversed_text, + ) def __iter__(self): yield from self.nodelist_loop