Django REST Framework missing imports with Docker


So, recently I’ve started creating project using Docker for the first time so my knowledge is not very great.

When I’m creating venv using python3 -m venv venv, and installing Rest Framework, everything works fine and I’m not having any problems at all.

But in my project with Docker, I have no idea why but PyLance detects missing imports with Django and Django REST.

enter image description here

It is really annoying, also when I’m making imports from Django, it makes suggestions:

enter image description here

But it won’t suggest anything when making imports from REST

enter image description here

Does anyone know how to fix this issue? I’ve tried:

  • Opening VSC in different directories
  • Rebuliding Docker image

Everything works fine, my requirements file contains REST Framework therefore it works fine. It is all about theese non-sense missing modules.

Source: Docker Questions

Categorised as django, django-rest-framework, docker, import, python Tagged , , , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us