I do my first steps with the Django REST Framework. But when I do:
python3 manage.py makemigrations && python3 manage.py migrate
I get this error:
ModuleNotFoundError: No module named 'rest_framework.renderers'
I have checked the settings.py:
INSTALLED_APPS = [
'api',
'rest_framework',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
I checked pip3 if the package is installed:
Django==3.0.5
django-rest-framework==0.1.0
djangorestframework==3.11.0
This is the code snippet where I use it and where I get the error:
from django.http import HttpResponse
from rest_framework.renderers import JSONRenderer
from rest_framework.decorators import api_view
from .models import Repo, Category
from .serializers import repoSerializer, categorySerializer
I do not know where the error is. Can somebody give me a hint? Is maybe there a problem with the migration?