parameters: (self, obj)
return_statement: return result
docstring: :param obj:
          :return: 30天前
          remain_days<-30，return 30天前
          remain_days>-30，return 具体天数
docstring_summary: :param obj:
          :return: 30天前
          remain_days<-30，return 30天前
          remain_days>-30，return 具体天数
docstring_tokens: : param obj : : return : 30天前 remain_days< - 30，return 30天前 remain_days > - 30，return 具体天数
function: def deadline_format(self, obj):
          '''
          :param obj:
          :return: 30天前
          remain_days<-30，return 30天前
          remain_days>-30，return 具体天数
          '''
  
          result = {"label":"","color":""}
          if obj.Status != 2 and obj.Status != 3:
              task = models.Task.objects.get(int(obj.id))
              remain_days = (task.DeadLine.replace(tzinfo=None)-datetime.datetime.utcnow()).days
              if remain_days<-100:
                  label = '3个月前'
                  result = {"label":label,"color":"red"}
  
              if remain_days < 0 and remain_days>-100:
                  label = str(abs(remain_days)) + '天前'
                  result = {"label":label,"color":"error"}
              if remain_days > 0 and remain_days<=7:
                  label = str(remain_days) + '天后'
                  result = {"label":label,"color":"volcano"}
              if remain_days>7:
                  label = str(remain_days) + '天后'
                  result = {"label":label,"color":"default"}
  
              if remain_days == 0:
                  result = {"label":"今天","color":"primary"}
          return result
function_tokens: def deadline_format ( self , obj ) : result = { "label" : "" , "color" : "" } if obj . Status != 2 and obj . Status != 3 : task = models . Task . objects . get ( int ( obj . id ) ) remain_days = ( task . DeadLine . replace ( tzinfo = None ) - datetime . datetime . utcnow ( ) ) . days if remain_days < - 100 : label = '3个月前' result = { "label" : label , "color" : "red" } if remain_days < 0 and remain_days > - 100 : label = str ( abs ( remain_days ) ) + '天前' result = { "label" : label , "color" : "error" } if remain_days > 0 and remain_days <= 7 : label = str ( remain_days ) + '天后' result = { "label" : label , "color" : "volcano" } if remain_days > 7 : label = str ( remain_days ) + '天后' result = { "label" : label , "color" : "default" } if remain_days == 0 : result = { "label" : "今天","co l or":"pr i mary"} return result