Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 8d6c276328b43ab0351cbfae9bcfcacfa9fdd47d 1 parent a9c36d8
Adrian Holovaty authored August 19, 2005

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  django/core/defaultfilters.py
5  django/core/defaultfilters.py
... ...
@@ -1,6 +1,7 @@
1 1
 "Default variable filters"
2 2
 
3  
-import template, re, random
  3
+import template, re
  4
+import random as random_module
4 5
 
5 6
 ###################
6 7
 # STRINGS         #
@@ -232,7 +233,7 @@ def length_is(value, arg):
232 233
 
233 234
 def random(value, _):
234 235
     "Returns a random item from the list"
235  
-    return random.choice(value)
  236
+    return random_module.choice(value)
236 237
 
237 238
 def slice_(value, arg):
238 239
     """

0 notes on commit 8d6c276

Please sign in to comment.
Something went wrong with that request. Please try again.