Aarohi Kulkarni
Aarohi Kulkarni

Reputation: 427

Remove Python Social Auth from django admin

I tried unregistering the models from 'social.apps.django_app.default' app. But django says they are not registered. I don't understand how to remove Association, Nonce and UserSocialAuth from my django admin site.

Thanks

Upvotes: 3

Views: 1551

Answers (3)

Ishika Jain
Ishika Jain

Reputation: 1177

For me below thing worked

from django.contrib import admin
from social_django.models import Association, Nonce, UserSocialAuth
admin.site.unregister(Association)
admin.site.unregister(Nonce)
admin.site.unregister(UserSocialAuth)

Upvotes: 1

mapes911
mapes911

Reputation: 100

I was able to remove these by doing the following

from django.contrib import admin
from social.apps.django_app.default.models import Association, Nonce, UserSocialAuth

admin.site.unregister(Association)
admin.site.unregister(Nonce)
admin.site.unregister(UserSocialAuth)

Upvotes: 4

abober
abober

Reputation: 56

I tried to unregister those models in the my_app/urls.py and it worked for me. For example:

my_app/urls.py:

admin.site.unregister(Nonce)

Upvotes: 1

Related Questions