def METHOD_NAME(project, request, flash=True):
    request.db.add(
        JournalEntry(
            name=project.name,
            action="docdestroy",
            submitted_by=request.user,
        )
    )
    request.task(remove_documentation).delay(project.name)
    project.has_docs = False
    if flash:
        request.session.flash(
            f"Deleted docs for project {project.name!r}", queue="success"
        )