Beispiel #1
0
def create_subscribe(email):
    """Create a subscribe record."""
    SubscribeList.create(email=email)
Beispiel #2
0
 def test_create_subscribe_record(self):
     """Makes sure a subscription gets created."""
     create_subscribe('*****@*****.**')
     s = SubscribeList.select().where(SubscribeList.email == '*****@*****.**')
Beispiel #3
0
def subscription_exists(form, field):
    if SubscribeList.select().where(SubscribeList.email == field.data).exists():
        raise ValidationError('You are already subscribed.')