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
This commit is contained in:
Adrian Holovaty 2005-08-19 14:59:09 +00:00
parent a9c36d8db5
commit 8d6c276328
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
"Default variable filters" "Default variable filters"
import template, re, random import template, re
import random as random_module
################### ###################
# STRINGS # # STRINGS #
@ -232,7 +233,7 @@ def length_is(value, arg):
def random(value, _): def random(value, _):
"Returns a random item from the list" "Returns a random item from the list"
return random.choice(value) return random_module.choice(value)
def slice_(value, arg): def slice_(value, arg):
""" """