当前位置: 首页>>代码示例>>Python>>正文


Python Channel.email_verified方法代码示例

本文整理汇总了Python中hc.api.models.Channel.email_verified方法的典型用法代码示例。如果您正苦于以下问题:Python Channel.email_verified方法的具体用法?Python Channel.email_verified怎么用?Python Channel.email_verified使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hc.api.models.Channel的用法示例。


在下文中一共展示了Channel.email_verified方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _make_user

# 需要导入模块: from hc.api.models import Channel [as 别名]
# 或者: from hc.api.models.Channel import email_verified [as 别名]
def _make_user(email):
    username = str(uuid.uuid4())[:30]
    user = User(username=username, email=email)
    user.save()

    channel = Channel()
    channel.user = user
    channel.kind = "email"
    channel.value = email
    channel.email_verified = True
    channel.save()

    return user
开发者ID:bobocola,项目名称:healthchecks,代码行数:15,代码来源:views.py

示例2: handle

# 需要导入模块: from hc.api.models import Channel [as 别名]
# 或者: from hc.api.models.Channel import email_verified [as 别名]
    def handle(self, *args, **options):

        for user in User.objects.all():
            q = Channel.objects.filter(user=user)
            q = q.filter(kind="email", email_verified=True, value=user.email)
            if q.count() > 0:
                continue

            print("Creating default channel for %s" % user.email)
            channel = Channel(user=user)
            channel.kind = "email"
            channel.value = user.email
            channel.email_verified = True
            channel.save()

            channel.checks.add(*Check.objects.filter(user=user))
开发者ID:cecepm,项目名称:healthchecks,代码行数:18,代码来源:makechannels.py

示例3: _make_user

# 需要导入模块: from hc.api.models import Channel [as 别名]
# 或者: from hc.api.models.Channel import email_verified [as 别名]
def _make_user(email):
    username = str(uuid.uuid4())[:30]
    user = User(username=username, email=email)
    user.set_unusable_password()
    user.save()

    profile = Profile(user=user)
    profile.save()

    channel = Channel()
    channel.user = user
    channel.kind = "email"
    channel.value = email
    channel.email_verified = True
    channel.save()

    return user
开发者ID:haswalt,项目名称:healthchecks,代码行数:19,代码来源:views.py

示例4: _make_user

# 需要导入模块: from hc.api.models import Channel [as 别名]
# 或者: from hc.api.models.Channel import email_verified [as 别名]
def _make_user(email):
    username = str(uuid.uuid4())[:30]
    user = User(username=username, email=email)
    user.set_unusable_password()
    user.save()

    # Ensure a profile gets created
    Profile.objects.for_user(user)

    channel = Channel()
    channel.user = user
    channel.kind = "email"
    channel.value = email
    channel.email_verified = True
    channel.save()

    return user
开发者ID:cogzidel,项目名称:healthchecks,代码行数:19,代码来源:views.py


注:本文中的hc.api.models.Channel.email_verified方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。