def verify_email(request, code, token):
    channel = get_object_or_404(Channel, code=code)
    if (channel.make_token() == token):
        channel.email_verified = True
        channel.save()
        return render(request, 'front/verify_email_success.html')
    return render(request, 'bad_link.html')
def verify_email(request, code, token):
    channel = get_object_or_404(Channel, code=code)
    if (channel.make_token() == token):
        channel.email_verified = True
        channel.save()
        return render(request, 'front/verify_email_success.html')
    return render(request, 'bad_link.html')