reg/utils.py
author nishanth
Sat, 17 Apr 2010 13:38:25 +0530
changeset 96 e51b94b6b5a4
parent 6 057498d12450
permissions -rwxr-xr-x
now comments also will be displayed through the unordered_list filter

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)])