Example #1
0
def set_password(username, password):
    redis.hset('user:passwords', slug(username), generate_password_hash(password))
Example #2
0
def create_invite(email):
    h = hashlib.new('md5')
    h.update(os.urandom(128))
    key = h.hexdigest()
    redis.hset('user:keys', key, email)
    return key
Example #3
0
def set_type_template(slug, key, value):
    if value:
        redis.hset("t:%s" % key, slug, value)
Example #4
0
def get_email(username, email):
    redis.hset('user:emails', slug(username))
Example #5
0
 def set(id, value):
     if value: 
         redis.hset(REDIS_SESSION, id, value)
     else:
         redis.hdel(REDIS_SESSION, id)