Hi guys!

Thanks for those responses. So, the random.randint function does exist:
# python
Python 2.3.5 (#1, Aug 25 2005, 09:17:44) 
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> random.randint
<bound method Random.randint of <random.Random object at 0x80a6c6c>>

And here's whar Thomas suggests:
AssertionError at /
/usr/lib/python2.3/random.pyc



El vie, 19-10-2007 a las 15:12 +0200, Thomas Guettler escribi�:
> >   File
> > "/usr/lib/python2.3/site-packages/django/contrib/sessions/models.py", line
> > 19, in get_new_session_key session_key = md5.new("%s%s%s%s" %
> > (random.randint(0, sys.maxint - 1), os.getpid(), time.time(),
> > settings.SECRET_KEY)).hexdigest()
> >
> > AttributeError: 'module' object has no attribute 'randint'
> 
> You can test what random module you are using:
> 
> insert a line above: assert False, random.__file__
> 
> You can test the random module:
> 
> python /usr/lib64/python2.4/random.py
> 2000 times random
> 0.003 sec, avg 0.497669, stddev 0.288045, min 0.00160483, max 0.99949
> 2000 times normalvariate
> ....
> 
> HTH,
>  Thomas
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to