Skip to content

Error: An admin for model "User" has to be registered to be referenced by TokenAdmin.autocomplete_fields. #9296

Discussion options

You must be logged in to vote

When you got this error, did you call unregister on you custom admin site or on the default admin site? DRF registers on the default site, so even though you're not using it, perhaps it's making the Django checks fail?

I don't want it in our admin site, as we don't use tokens (only sessions)

Do you have 'rest_framework.authtoken' in your INSTALLED_APPS? If you're not using Tokens, I guess you shouldn't have it, but perhaps it's there?

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@i-huzaifa-arshad
Comment options

@browniebroke
Comment options

@i-huzaifa-arshad
Comment options

Comment options

You must be logged in to vote
4 replies
@browniebroke
Comment options

Answer selected by kevinrenskers
@kevinrenskers
Comment options

@browniebroke
Comment options

@kevinrenskers
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants