I want hide all django-allauth
model from admin page
after I see the source code in github I see it use three models SocialAccount
, SocialToken
and SocialApp
.
now I use this to hide model from admin page and it works when I try to use it on my own model but
when I use it to hide django-allauth
model it doesnt work, I think I stuck on the part from x import SocialAccount, SocialToken, SocialApp
because the error message is always like this
ImportError: cannot import name 'SocialAccount' from 'x'
I dont know the x
part what to import, where to import
this works.
from allauth.socialaccount.models import SocialAccount, SocialApp, SocialToken
admin.site.unregister(SocialAccount)
admin.site.unregister(SocialApp)
admin.site.unregister(SocialToken)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With