Example #1
0
def variant_search_page(request, project_guid=None, family_guid=None):
    """Generates the variant_search page, with initial variant_search json embedded."""

    initial_json = json.loads(
        variant_search_page_data(request, project_guid, family_guid).content)

    return render_with_initial_json('variant_search.html', initial_json)
Example #2
0
def dashboard_page(request):
    """Generates the dashboard page, with initial dashboard_page_data json embedded."""

    initial_json = json.loads(
        dashboard_page_data(request).content
    )

    return render_with_initial_json('dashboard.html', initial_json)
Example #3
0
def project_page(request, project_guid):
    """Generates the project page, with initial project_page_data json embedded."""

    initial_json = json.loads(
        project_page_data(request, project_guid).content
    )

    return render_with_initial_json('project_page.html', initial_json)
Example #4
0
def variant_search_page(request, project_guid):
    """Generates the dashboard page, with initial variant_search_page json embedded."""

    # check project permissions
    project = _get_project_and_check_permissions(project_guid, request.user)

    initial_json = json.loads(variant_search_page_data(request).content)

    return render_with_initial_json('variant_search.html', initial_json)
Example #5
0
def case_review_page(request, project_guid):
    """Generates the case review page, with initial case_review_page_data json embedded.

    Args:
        project_guid (string): GUID of the Project under case review.
    """

    initial_json = json.loads(
        case_review_page_data(request, project_guid).content)

    return render_with_initial_json('case_review.html', initial_json)
Example #6
0
def variant_search_page(request, project_guid):
    """Generates the dashboard page, with initial variant_search_page json embedded."""

    # check project permissions
    project = Project.objects.filter(guid=project_guid)
    if not project:
        raise ValueError("Invalid project id: %s" % project_guid)

    project = project[0]
    if not (request.user.is_staff or request.user.has_perm(CAN_VIEW, project)):
        raise PermissionDenied("%s does not have VIEW permissions for %s" %
                               (request.user, project))

    initial_json = json.loads(variant_search_page_data(request).content)

    return render_with_initial_json('variant_search.html', initial_json)