0๐
โ
I had a tricky mistake. This is what I had in my settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'user',
'rest_framework_simplejwt',
'channels',
'daphne',
]
I moved channels and daphne to the top of the list and it worked. Like this
INSTALLED_APPS = [
'channels',
'daphne',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'user',
'rest_framework_simplejwt',
]
Source:stackexchange.com