quiz/utils.py
author nishanth
Tue, 20 Apr 2010 15:31:21 +0530
changeset 12 81cd0140a0f2
child 39 0fa055b8ea98
permissions -rw-r--r--
created the register user functionality.

import string
import random

def gen_key(no_of_chars):
    allowed_chars = string.digits+string.uppercase
    return ''.join([random.choice(allowed_chars) for i in range(no_of_chars)])