本文整理汇总了Python中verify_student.models.SoftwareSecurePhotoVerification.display_off方法的典型用法代码示例。如果您正苦于以下问题:Python SoftwareSecurePhotoVerification.display_off方法的具体用法?Python SoftwareSecurePhotoVerification.display_off怎么用?Python SoftwareSecurePhotoVerification.display_off使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类verify_student.models.SoftwareSecurePhotoVerification
的用法示例。
在下文中一共展示了SoftwareSecurePhotoVerification.display_off方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: toggle_failed_banner_off
# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import display_off [as 别名]
def toggle_failed_banner_off(request):
"""
Finds all denied midcourse reverifications for a user and permanently toggles
the "Reverification Failed" banner off for those verifications.
"""
user_id = request.POST.get('user_id')
SoftwareSecurePhotoVerification.display_off(user_id)
示例2: toggle_failed_banner_off
# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import display_off [as 别名]
def toggle_failed_banner_off(request):
"""
Finds all denied midcourse reverifications for a user and permanently toggles
the "Reverification Failed" banner off for those verifications.
"""
user_id = request.user.id
SoftwareSecurePhotoVerification.display_off(user_id)
return HttpResponse('Success')
示例3: test_display
# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import display_off [as 别名]
def test_display(self):
user = UserFactory.create()
window = MidcourseReverificationWindowFactory()
attempt = SoftwareSecurePhotoVerification(user=user, window=window, status="denied")
attempt.save()
# We expect the verification to be displayed by default
self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), True)
# Turn it off
SoftwareSecurePhotoVerification.display_off(user.id)
self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), False)