示例#1
0
 def queryset(self, request, queryset):
     if self.value() in ('0', '1'):
         result = [
             team.id for team in queryset
             if queries.eligible(team) == (self.value() == '1')
         ]
         return queryset.filter(id__in=result)
示例#2
0
文件: loggers.py 项目: PACTF/pactf
def log_registration(request, team, new):
    eligible = "eligible" if queries.eligible(team) else "ineligible"
    message = _format_request(request)

    if new:
        ip_logger.info("register new {} team: {}".format(eligible, message))
    else:
        ip_logger.info("join old {} team: {}".format(eligible, message))
示例#3
0
def log_registration(request, team, new):
    eligible = "eligible" if queries.eligible(team) else "ineligible"
    message = _format_request(request)

    if new:
        ip_logger.info("register new {} team: {}".format(eligible, message))
    else:
        ip_logger.info("join old {} team: {}".format(eligible, message))
示例#4
0
文件: admin.py 项目: PACTF/pactf
 def queryset(self, request, queryset):
     if self.value() in ('0', '1'):
         result = [team.id for team in queryset
                   if queries.eligible(team)
                   == (self.value() == '1')]
         return queryset.filter(id__in=result)
示例#5
0
文件: admin.py 项目: PACTF/pactf
 def eligible(self, team):
     return queries.eligible(team)
示例#6
0
def eligible(team):
    return queries.eligible(team)