35👍
I just hit the same error with Token not User.
You need to add ‘rest_framework.authtoken’ to your INSTALLED_APPS
And don’t forget to manage.py migrate afterward.
That fixed it for me.
2👍
I just got the same error and added the following lines into settings.py file.
SIMPLE_JWT = {
'ROTATE_REFRESH_TOKENS': False,
'BLACKLIST_AFTER_ROTATION': False,
'UPDATE_LAST_LOGIN': False,
}
Alse added the following line into settings.py file.
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'rest_framework',
'rest_framework.authtoken',
'rest_framework_simplejwt' #new line
]
Also run this command: python manage.py migrate
Now, it’s working.
- Api key and Django Rest Framework Auth Token
- How to test a model that has a foreign key in django?
- Project management/build tools for a Django project?
- Django abstract parent model save overriding
- Having a separate database for django-admin in django
- Extending custom router to default router across apps in Django Rest Framework
- Django query how to write: WHERE field LIKE '10__8__0__'?
- HttpResponseRedirect after login form not redirecting to profile
- How to delete user in django?
- Django social authentication error using python-social-auth
Source:stackexchange.com