开发者

cannot remove installed apps from admin

开发者 https://www.devze.com 2023-03-22 14:51 出处:网络
this is a followup question to Remove default apps from Django-admin I am trying t remove Sites from my admin site and I call

this is a followup question to Remove default apps from Django-admin

I am trying t remove Sites from my admin site and I call

admin.site.unregister(Site)
as was suggested.

Iam getting an error saying that Site is not registered. Apparently my admin.py is called before th开发者_如何学编程e Site model is registered. Is there a cleaner way to accomplish what I need?

thanks konstantin


the cause was a wrong ordering of installed applications. here is the answer: Issue with Django admin registering an inline user profile admin

0

精彩评论

暂无评论...
验证码 换一张
取 消