diff options
author | Goblin911 <goblinliu@gmail.com> | 2013-08-27 11:05:28 +0800 |
---|---|---|
committer | Goblin911 <goblinliu@gmail.com> | 2013-08-27 11:05:28 +0800 |
commit | f8945d9f2be18b1c05d66a5e2dba351061e2a57b (patch) | |
tree | 3be30d087c9245a0d1d1a846a9d12e9ce735d34a /server/piztor/model.py | |
parent | f4595bc3d9afaac5d3c91bb95dff0217cf5b728c (diff) | |
parent | 2c3891cf77538c57b172404c5c35b846ec6b0de6 (diff) |
Merge branch 'master' of ssh://github.com/Determinant/piztor
Diffstat (limited to 'server/piztor/model.py')
-rw-r--r-- | server/piztor/model.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/piztor/model.py b/server/piztor/model.py index 4621bbe..8916e3a 100644 --- a/server/piztor/model.py +++ b/server/piztor/model.py @@ -6,6 +6,8 @@ Base = declarative_base() _SALT_LEN = 16 _TOKEN_LEN = 16 +MAX_USERNAME_SIZE = 20 +MAX_PASSWORD_SIZE = 20 class _TableName: # avoid typoes UserModel = 'users' @@ -17,7 +19,7 @@ class UserModel(Base): id = Column(Integer, primary_key = True) gid = Column(Integer) - username = Column(String) + username = Column(String(MAX_USERNAME_SIZE)) sex = Column(Boolean) location = None auth = None |