[storm] (no subject)

Tim Moran tim at t-moran.com
Tue Apr 22 14:17:21 BST 2008


Hi,

I'm creating a simple User model - like so:

class User(Storm):
  __storm_table__ = "site_users"
  id = Int(primary=True)
  user_name = Unicode()
  email_address = Unicode()
  password = Unicode()

I'm wanting to make sure that user_name and email_address are unique for
each user. Would the easiest way of doing this be to subclass an existing
Property class and overide __set__ to add in the validation that way, or
is there a simpler way?

Thanks,

Tim.



More information about the storm mailing list