@require_objs_permissions_for_view(
    perm_names=["can_view_project"],
    permittee_func=get_user_from_req,
    target_func=get_queryset(Project, "proj_id"),
)
@require_objs_permissions_for_view(
    perm_names=["can_edit_project"],
    permittee_func=get_user_from_req,
    target_func=get_queryset(Project, "proj_id"),
    methods=["POST"],
)
def update(request, proj_id, iframe=False):
    '''Update information about a project'''
    
    project = get_object_or_404(Project, id=proj_id)
    must_have_permission(request.user, project, "can_edit_project") 

    def redirect(instance):
        if iframe:
            return reverse("project_list")
        else:
            return reverse("project_detail", args=[instance.id])
    
    return generic_crud(
        request, proj_id,
        model=Project,
        form_class=ProjectCreateForm,
        template=TEMPLATE_PATH+"/create_update.html",
        redirect=redirect,
        template_object_name="project",
        extra_context={
            "breadcrumbs": (
                ("Home", reverse("home")),
                ("Project %s" % project.name, reverse("project_detail", args=[project.id])),
                ("Update Info", request.path),
            ),
        },
        success_msg = lambda instance: "Successfully updated project %s." % instance.name,
    )
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/clearinghouse/project/views.py/update/original