Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unregister table from django admin whose created when package are installed

I want to remove some table or section form my django admin.

for example: i install summernote package who created attachment table in my admin. i dont want to show this table in admin (see in below screenshot)

enter image description here

like image 820
BInjal Patel Avatar asked Oct 28 '25 01:10

BInjal Patel


1 Answers

You can unregister default models in admin.py of your app by using unregister.

from django.contrib import admin
from django_summernote.models import Attachment

admin.site.unregister(Attachment)
like image 123
mrzrm Avatar answered Oct 30 '25 18:10

mrzrm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!