diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index bc158da80a..85e03f3b75 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -1,4 +1,5 @@ import operator +from functools import reduce from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.core.paginator import InvalidPage diff --git a/django/core/exceptions.py b/django/core/exceptions.py index 201a854a4b..e3d1dc9c7e 100644 --- a/django/core/exceptions.py +++ b/django/core/exceptions.py @@ -1,6 +1,7 @@ """ Global Django exception and warning classes. """ +from functools import reduce class DjangoRuntimeWarning(RuntimeWarning): pass diff --git a/django/utils/crypto.py b/django/utils/crypto.py index f826c8a80c..9d6486c601 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -8,6 +8,7 @@ import hashlib import binascii import operator import time +from functools import reduce # Use the system PRNG if possible import random