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:
parent
a9c36d8db5
commit
8d6c276328
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue