Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UserModel(object):
- """
- Modeled after Django's models, Constrictor models will hopefully end up being
- both powerful and simple.
- """
- id = mysql.fields.int(primary = True, null = False, auto_increment = True)
- username = mysql.fields.string(size = 32)
- # Password is a special fields used to make working with passwords easier.
- # Algorithm can either be a string defining a standard hash or a class that
- # that acts like a standard hashlib library
- password = mysql.fields.password(algorithm = 'sha256')
- is_admin = mysql.fields.boolean(null = False)
Add Comment
Please, Sign In to add comment