def get_account_id_by_email(email): account = AccountPrototype.get_by_email(normalize_email(email)) return account.id if account else None
def clean(self, value): email = super(EmailField, self).clean(value) return logic.normalize_email(email)