If anyone knows how to solve this, please don't hesitate to help. I've tried many hints, but so far this problem still remains. Too frustrating!
I just started a little project on Django because I want to test Django Rest Framework. I created a project called project
and inside it an app called user
.
After that, I created a directory called api
inside user
and then I created the files viewsets.py
and serializers.py
in order to test Django Rest Framework.
In urls.py I imported "UsuarioViewSet" class from viewsets.
from project.user.api.viewsets import UsuarioViewSet
When I run python manage.py runserver
the problem bellow ocurrs
(I also tried only user.api.viewsets
... but it says "unresolved reference")
In my settings.py
I registered 'user' and 'rest_framework':
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'user',
]
OS: Linux Mint | IDE: PyCharm (community) | Virtualenv: venv | Python: 3.6.6