示例#1
0
 def validate_python(self, value, state):
     rows = UserAcct.select(func.LOWER(UserAcct.q.email_address) == value.lower()).count()
     if rows:
         raise formencode.Invalid('Sorry, that email exists', value, state)
示例#2
0
 def list(self):
     u = UserAcct.select(orderBy=UserAcct.q.created).reversed()
     return dict(users=u)