def saved_variants(request, project_id, family_id): project = get_object_or_404(Project, project_id=project_id) family = get_object_or_404(Family, project=project, family_id=family_id) if not project.can_view(request.user): raise PermissionDenied variants, couldntfind = get_saved_variants_for_family(family) # TODO: first this shouldnt be in API - base should never depend on api # TODO: also this should have better naming add_extra_info_to_variants_project(get_reference(), project, variants, add_family_tags=True, add_populations=True) return render( request, 'family/saved_family_variants.html', { 'project': project, 'family': family, 'variants_json': json.dumps([v.toJSON() for v in variants]), 'new_page_url': '/project/{0}/family_page/{1}'.format( family.seqr_family.project.guid, family.seqr_family.guid) if family.seqr_family else None, })
def saved_variants(request, project_id, family_id): project = get_object_or_404(Project, project_id=project_id) family = get_object_or_404(Family, project=project, family_id=family_id) if not project.can_view(request.user): return HttpResponse('unauthorized') variants, couldntfind = get_saved_variants_for_family(family) # TODO: first this shouldnt be in API - base should never depend on api # TODO: also this should have better naming add_extra_info_to_variants_family(get_reference(), family, variants) return render(request, 'family/saved_family_variants.html', { 'project': project, 'family': family, 'variants_json': json.dumps([v.toJSON() for v in variants]), })
def saved_variants(request, project_id, family_id): project = get_object_or_404(Project, project_id=project_id) family = get_object_or_404(Family, project=project, family_id=family_id) if not project.can_view(request.user): raise PermissionDenied variants, couldntfind = get_saved_variants_for_family(family) # TODO: first this shouldnt be in API - base should never depend on api # TODO: also this should have better naming add_extra_info_to_variants_family(get_reference(), family, variants) return render(request, 'family/saved_family_variants.html', { 'project': project, 'family': family, 'variants_json': json.dumps([v.toJSON() for v in variants]), })
def saved_variants(request, project_id, family_id): project = get_object_or_404(Project, project_id=project_id) family = get_object_or_404(Family, project=project, family_id=family_id) if not project.can_view(request.user): raise PermissionDenied variants, couldntfind = get_saved_variants_for_family(family) # TODO: first this shouldnt be in API - base should never depend on api # TODO: also this should have better naming add_extra_info_to_variants_project(get_reference(), project, variants, add_family_tags=True, add_populations=True) return render(request, 'family/saved_family_variants.html', { 'project': project, 'family': family, 'variants_json': json.dumps([v.toJSON() for v in variants]), 'new_page_url': '/project/{0}/family_page/{1}'.format( family.seqr_family.project.guid, family.seqr_family.guid) if family.seqr_family else None, })