5👍
✅
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)
4👍
In your settings.py
, change the INSTALLED_APPS
structure something as below,
INSTALLED_APPS = [
'django_summernote', # this is the third-party app
'my_django_app', # this is your app
...
]
Then, in the admin.py
of my_django_app
from django_summernote.models import Attachment
admin.site.unregister(Attachment)
The order of INSTALLED_APPS
structure is important here. Because, Django loads each apps according to the order in which we put those in the INSTALLED_APPS
.
👤JPG
- [Django]-Xapian search terms which exceed the 245 character length: InvalidArgumentError: Term too long (> 245)
- [Django]-Which is a better way to check request conditions?
Source:stackexchange.com