コード例 #1
0
ファイル: wiki.py プロジェクト: joshz/weeki
    def save_user(self, username, password, email):
        passwd = cookie.make_pw_hash(password, SECRET)

        user = models.User(username=username,
                password=passwd,
                email=email)

        ukey = user.put()
        return ukey.id()
コード例 #2
0
ファイル: wiki.py プロジェクト: joshz/weeki
    def get_user(self, name, password):
#        user = models.User.all().filter('username='******'WHERE username=:1', name).fetch(1)[0]
        except IndexError:
            return None

        passwd = cookie.make_pw_hash(password, SECRET, user.password)

        if passwd == user.password:
            return user.key().id()