Guest User

Untitled

a guest
Jun 9th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class UserModel(object):
  2. """
  3. Modeled after Django's models, Constrictor models will hopefully end up being
  4. both powerful and simple.
  5. """
  6. id = mysql.fields.int(primary = True, null = False, auto_increment = True)
  7. username = mysql.fields.string(size = 32)
  8. # Password is a special fields used to make working with passwords easier.
  9. # Algorithm can either be a string defining a standard hash or a class that
  10. # that acts like a standard hashlib library
  11. password = mysql.fields.password(algorithm = 'sha256')
  12. is_admin = mysql.fields.boolean(null = False)
Add Comment
Please, Sign In to add comment