summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/src/authentication
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2016-06-01 17:13:27 -0400
committerChris McDonough <chrism@plope.com>2016-06-01 17:13:27 -0400
commit3e9a737500e79a6a919ce53db9557c75d874b84c (patch)
treeef674c176ab29b9dede8a8fa70c3a18a26edde44 /docs/tutorials/wiki2/src/authentication
parentb5f065906f75efdcc9f80d4f0b8b4092e92b41c0 (diff)
parent382f93e2bfec5563587e306fda3fd34759314300 (diff)
downloadpyramid-3e9a737500e79a6a919ce53db9557c75d874b84c.tar.gz
pyramid-3e9a737500e79a6a919ce53db9557c75d874b84c.tar.bz2
pyramid-3e9a737500e79a6a919ce53db9557c75d874b84c.zip
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/tutorials/wiki2/src/authentication')
-rw-r--r--docs/tutorials/wiki2/src/authentication/tutorial/models/page.py2
-rw-r--r--docs/tutorials/wiki2/src/authentication/tutorial/models/user.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/models/page.py b/docs/tutorials/wiki2/src/authentication/tutorial/models/page.py
index 4dd5b5721..74ff1faf8 100644
--- a/docs/tutorials/wiki2/src/authentication/tutorial/models/page.py
+++ b/docs/tutorials/wiki2/src/authentication/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')
diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py b/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
index 6bd3315d6..6fb32a1b2 100644
--- a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/authentication/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