diff --git a/django/core/defaultfilters.py b/django/core/defaultfilters.py index 435f8632a37..f6fd420572a 100644 --- a/django/core/defaultfilters.py +++ b/django/core/defaultfilters.py @@ -1,6 +1,7 @@ "Default variable filters" -import template, re, random +import template, re +import random as random_module ################### # STRINGS # @@ -232,7 +233,7 @@ def length_is(value, arg): def random(value, _): "Returns a random item from the list" - return random.choice(value) + return random_module.choice(value) def slice_(value, arg): """