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)
def list(self): u = UserAcct.select(orderBy=UserAcct.q.created).reversed() return dict(users=u)