Import "rest_framework_swagger.views" could not be resolved

Viewed 375

I wanted to implement swagger in Django rest framework, for that I install django-rest-swagger and register in setting.py but while importing in url.py it show error:-

"Import "rest_framework_swagger.views" could not be resolved.

How can I use rest_framework_swagger?

1 Answers

There could be many reasons but the truth is you shouldn't be using a project that's read-only for over 2.5 years.

Try drf-yasg or drf-spectacular instead.

Anyway, if you installed the lib you're talking about with

pip install django-rest-swagger

it should be available in your environment. Make sure you see it in pip freeze.

Related