-
Couldn't load subscription status.
- Fork 816
Open
Labels
Description
I am getting an issue with admin page extension. When I do
admin.site.register (AccessToken, AccessTokenAdmin)
where AccessTokenAdmin is my class, then I get the error "The model AccessToken is already registered".
I propose a solution when you can specify a class file for the django administration panel:
ACCESS_TOKEN_ADMIN = getattr (settings, "OAUTH2_PROVIDER_ACCESS_TOKEN_ADMIN", "custom.AccessToken")
Currently, we have to solve this problem as follows:
if not admin.site.is_registered (AccessToken):
admin.site.register (AccessToken, AccessTokenAdmin)
I'm willing to contribute if the community supports it.