From 4918628b83319749f73e843ef01a0b9060f5956e Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 19 May 2016 23:37:38 -0500 Subject: oops, encode the password in the authorization tutorial as well --- docs/tutorials/wiki2/src/authorization/tutorial/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/src/authorization') diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py b/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py index 6bd3315d6..6fb32a1b2 100644 --- a/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py +++ b/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py @@ -23,7 +23,7 @@ class User(Base): def check_password(self, pw): if self.password_hash is not None: - expected_hash = self.password_hash + expected_hash = self.password_hash.encode('utf8') actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash) return expected_hash == actual_hash return False -- cgit v1.2.3 From a004ca4068b60fa79552b71da2d953e47463a536 Mon Sep 17 00:00:00 2001 From: viniciusban Date: Fri, 20 May 2016 15:32:26 -0300 Subject: Change column `Page.data` to `Text` --- docs/tutorials/wiki2/src/authorization/tutorial/models/page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/src/authorization') diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/models/page.py b/docs/tutorials/wiki2/src/authorization/tutorial/models/page.py index 4dd5b5721..74ff1faf8 100644 --- a/docs/tutorials/wiki2/src/authorization/tutorial/models/page.py +++ b/docs/tutorials/wiki2/src/authorization/tutorial/models/page.py @@ -14,7 +14,7 @@ class Page(Base): __tablename__ = 'pages' id = Column(Integer, primary_key=True) name = Column(Text, nullable=False, unique=True) - data = Column(Integer, nullable=False) + data = Column(Text, nullable=False) creator_id = Column(ForeignKey('users.id'), nullable=False) creator = relationship('User', backref='created_pages') -- cgit v1.2.3