Browse files

Fixed #371 -- Fixed bug in 'random' template filter. Thanks, Boffbowsh

git-svn-id: http://code.djangoproject.com/svn/django/trunk@538 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a9c36d8 commit 8d6c276328b43ab0351cbfae9bcfcacfa9fdd47d @adrianholovaty adrianholovaty committed Aug 19, 2005
Showing with 3 additions and 2 deletions.
  1. +3 −2 django/core/defaultfilters.py
View
5 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):
"""

0 comments on commit 8d6c276

Please sign in to comment.