Ticket #114: whrandom.patch

File whrandom.patch, 1.2 KB (added by anonymous, 19 years ago)
  • django/core/management.py

    diff -urN django_src/django/core/management.py django_src_patch/django/core/management.py
    old new  
    343343def startproject(project_name, directory):
    344344    "Creates a Django project for the given project_name in the given directory."
    345     from whrandom import choice
     345    from random import choice
    346346    _start_helper('project', project_name, directory)
    347347    # Populate TEMPLATE_DIRS for the admin templates, based on where Django is
    348348    # installed.
  • django/models/auth.py

    diff -urN django_src/django/models/auth.py django_src_patch/django/models/auth.py
    old new  
    172172        "Generates a random password with the given length and given allowed_chars"
    173173        # Note that default value of allowed_chars does not have "I" or letters
    174174        # that look like it -- just to avoid confusion.
    175         from whrandom import choice
     175        from random import choice
    176176        return ''.join([choice(allowed_chars) for i in range(length)])
    178178class Session(meta.Model):
Back to Top