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))
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))
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))
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')