From 0cea7b0778b082ee772a5870c6f2057328cb8b1f Mon Sep 17 00:00:00 2001 From: danigm Date: Sat, 7 Nov 2009 19:19:21 +0100 Subject: [PATCH] =?utf8?q?a=C3=B1adido=20metodo=20set=5Fpassword?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- db.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db.py b/db.py index 628a2b8..c7daa7f 100644 --- a/db.py +++ b/db.py @@ -25,6 +25,9 @@ class User(Base): def __init__(self, name, password): self.name = unicode(name) + set_password(password) + + def set_password(self, password): self.password = unicode(sha(password).hexdigest()) def auth(self, password): -- 2.1.4