diff --git a/django/template/context.py b/django/template/context.py index 8218e86491..8f349a3a96 100644 --- a/django/template/context.py +++ b/django/template/context.py @@ -43,7 +43,7 @@ class BaseContext: return repr(self.dicts) def __iter__(self): - yield from reversed(self.dicts) + return reversed(self.dicts) def push(self, *args, **kwargs): dicts = []