예제 #1
0
파일: __init__.py 프로젝트: Lunchable/eat
    def __call__(self, form, field):
        exists = User.objects(email=field.data).first()
        if self._email_should_exist and not exists:
            raise ValidationError(self._message or u'Email not found.')

        if not self._email_should_exist and exists:
            raise ValidationError(self._message or u'Email exists.')
예제 #2
0
파일: auth.py 프로젝트: Lunchable/eat
 def get_user(self):
     return User.objects(email=self.email.data).first()
예제 #3
0
파일: auth.py 프로젝트: Lunchable/eat
 def get_user(self):
     return User.objects(email=self.email.data).first()