mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #114 -- Changed uses of deprecated 'whrandom' module to 'random'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d330be0169
commit
8d144dadd8
@ -342,7 +342,7 @@ def _start_helper(app_or_project, name, directory, other_name=''):
|
||||
|
||||
def startproject(project_name, directory):
|
||||
"Creates a Django project for the given project_name in the given directory."
|
||||
from whrandom import choice
|
||||
from random import choice
|
||||
_start_helper('project', project_name, directory)
|
||||
# Populate TEMPLATE_DIRS for the admin templates, based on where Django is
|
||||
# installed.
|
||||
|
@ -172,7 +172,7 @@ class User(meta.Model):
|
||||
"Generates a random password with the given length and given allowed_chars"
|
||||
# Note that default value of allowed_chars does not have "I" or letters
|
||||
# that look like it -- just to avoid confusion.
|
||||
from whrandom import choice
|
||||
from random import choice
|
||||
return ''.join([choice(allowed_chars) for i in range(length)])
|
||||
|
||||
class Session(meta.Model):
|
||||
|
Loading…
Reference in New Issue
Block a user