Error Unresolved reference django error in PyCharm

0 votes

I'm trying to import:

from django.db import models

PyCharm underlines django.db and complains: Unresolved reference 'django'.

How do I get PyCharm to recognize Django?

Jul 2, 2020 in Python by kartik
• 37,510 points
6,465 views

1 answer to this question.

0 votes

Hello @kartik,

I assume you're using a virtualenv which is located in the same directory as other project files. Python should know exactly that path. So, it's possibly that Pycharm is using the wrong Interpreter.

Go to Settings -> Project: -> Project Interpreter -> switch to the right path

In the interpreter packages, there should be Django package installed. If not, do it here/in terminal.

Hope it helps!!

Thank you!!

answered Jul 2, 2020 by Niroj
• 82,880 points

Related Questions In Python

0 votes
1 answer

Error while installing cv2 module in pycharm

Go to tools -> python console -> ...READ MORE

answered Jun 24, 2019 in Python by Quin
10,893 views
0 votes
1 answer

Error: "Module not found" while importing tensorflow in pycharm.

Try the following: Go to Files -> Settings ...READ MORE

answered Jun 23, 2020 in Python by Sirajul
• 59,230 points
2,071 views
0 votes
1 answer

I tried to install this pip cryptography in Pycharm but I'm getting an error

Hello @Dilpreet , Have you tried updating pip version? ...READ MORE

answered Aug 4, 2020 in Python by Niroj
• 82,880 points
2,929 views
0 votes
1 answer

Error:“CSRF token missing or incorrect” while post parameter via AJAX in Django

Hello @kartik, The simplest way to include the {{csrf_token}} value ...READ MORE

answered Aug 13, 2020 in Python by Niroj
• 82,880 points
12,584 views
0 votes
1 answer

How to temporarily disable a foreign key constraint in MySQL?

Hello @kartik, To turn off foreign key constraint ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,880 points
2,043 views
0 votes
1 answer

How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,880 points
1,191 views
0 votes
1 answer

Error: port is already in use of Django Server

Hii @kartik, Just type sudo fuser -k 8000/tcp. This ...READ MORE

answered May 6, 2020 in Python by Niroj
• 82,880 points
13,364 views
0 votes
1 answer

Django Server Error: port is already in use

Hello @kartik, Just type: sudo fuser -k 8000/tcp. This ...READ MORE

answered Jun 26, 2020 in Python by Niroj
• 82,880 points
1,391 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP