taskapp/utilities/helper.py
author nishanth
Sat, 27 Feb 2010 10:48:43 +0530
changeset 128 f34e3a3e1439
parent 119 39ab7c460143
permissions -rw-r--r--
modified the notifications model. the sent_to is now a foreign key. now if we have a new type to be added, we can generate message and sub while creating notification. we can keep track of history using the role field in notification and task/sent_from

import string,random

def get_key():
    """ return a 10 character random key.
    """
    
    return ''.join([ random.choice(string.uppercase+string.digits) for i in range(10)])