Exemplo n.º 1
0
 def save_models(self):
     #获取保持对象
     obj = self.new_obj
     obj.save()
     if obj is not None:
         vedio_auth = obj
         vedio_auth.auditor = self.user.username
         vedio_auth.audiTime = timezone.now()
         #添加视频认证状态位
         user_profile = UserProfile.objects.filter(
             username=vedio_auth.applier).first()
         user_profile.bitState = BitStatesUtils.addState(
             user_profile.bitState, BitStatesUtils.GET_OP_VEDIO_AUTH())
         user_profile.save()
Exemplo n.º 2
0
 def isVedioAuth(self):
     return BitStatesUtils.hasState(self.bitState,
                                    BitStatesUtils.GET_OP_VEDIO_AUTH())