@require_objs_permissions_for_view(
    perm_names=["can_view_project"],
    permittee_func=get_user_from_req,
    target_func=get_queryset(Project, "proj_id"),
)
def detail(request, proj_id):
    '''Show information about the project'''
    project = get_object_or_404(Project, id=proj_id)
    role_reqs = ProjectRoleRequest.objects.filter(
        giver=request.user, requested_role__project=project)
    # Structure with members, ids and roles to pass to project template
    permittees = project.members_as_permittees.all()
    member_roles = dict()
    for permittee in permittees:
        member_roles[str(permittee.object.username)] = {"id": str(permittee.object.id), 
						"roles": permittee.projectrole_set.filter(project__name=project.name)}
    return list_detail.object_detail(
        request,
        Project.objects.all(),
        object_id=proj_id,
        template_name=TEMPLATE_PATH+"/detail.html",
        template_object_name="project",
        extra_context={
            "role_requests": role_reqs,
            "member_roles": member_roles,
            "breadcrumbs": (
                ("Home", reverse("home")),
                ("Project %s" % project.name, reverse("project_detail", args=[project.id])),
            )
        }
    )
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/clearinghouse/project/views.py/detail/original