示例#1
0
def no_users(request):

    project_ids = []
    for p in Project.active.all():
        if p.group.members.count() == 0:
            project_ids.append(p.pid)

    return project_list(request, Project.objects.filter(pid__in=project_ids))
示例#2
0
def over_quota(request):

    project_ids = []

    for p in Project.active.all():
        for pc in p.projectquota_set.all():
            if pc.is_over_quota():
                project_ids.append(p.pid)

    return project_list(request, Project.objects.filter(pid__in=project_ids))
示例#3
0
文件: admin.py 项目: russell/karaage
def still_to_complete_list(request):

    today = datetime.date.today()
    survey_group = get_object_or_404(SurveyGroup, start_date__year=today.year)
    
    survey_list = survey_group.survey_set.all()

    survey_ids = [x.projectsurvey.project.pid for x in survey_list]
    
    from karaage.projects.views.admin import project_list
    return project_list(request, Project.active.exclude(pid__in=survey_ids))
示例#4
0
文件: views.py 项目: generica/karaage
def projects_by_cap_used(request):
    from karaage.projects.views.admin import project_list
    return project_list(request, queryset=Project.active.all(), paginate=False, template_name='pbsmoab/project_capsort.html')