Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def validate_email(email):
    try:
        _validate_email(email)
        return True
    except ValidationError:
        return False
        


src/m/o/moscowdjango-HEAD/meetup/views.py   moscowdjango(Download)
 
from .models import Talk, Photo, Speaker, Event, Tutorial, Vote
from .utils import subscribe_mail, validate_email, set_vote_cookie, can_vote
 
 
def ajax_subscribe(request):
    if "email" in request.POST:
        email = request.POST['email']
        if validate_email(email) and subscribe_mail(email):
            return HttpResponse('OK')