---
slug: "DjangoAdmin管理画面から、削除ボタンを消す"
title: "Remove the Delete Button from the Django Admin Interface"
description: "\n\n\n\nDisable Deletion from List Checkboxes\nCreate a file like common/admins.py"
url: "https://www.ytyng.com/en/blog/DjangoAdmin管理画面から、削除ボタンを消す"
publish_date: "2011-06-17T01:10:55Z"
created: "2011-06-17T01:10:55Z"
updated: "2026-02-27T10:43:03.186Z"
categories: ["Django"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20240629/2149b02667f443ffbc2297dbde9b6077.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# Remove the Delete Button from the Django Admin Interface

<div class="document">


<div class="section" id="id1">
<h3>Disable Deletion from List Checkboxes</h3>
<p>Create a file like common/admins.py</p>
<pre class="literal-block">from django.contrib import admin
admin.site.disable_action('delete_selected')
</pre>
</div>
<div class="section" id="id2">
<h3>Disable Deletion from Detail Page</h3>
<p>Create a file like common/admins.py</p>
<pre class="literal-block">from django.contrib import admin
def has_delete_permission(self, request, obj=None):
    return False
admin.ModelAdmin.has_delete_permission = has_delete_permission
</pre>
</div>
</div>
