A
A
Alexander2016-04-07 11:43:12
PyCharm
Alexander, 2016-04-07 11:43:12

PyCharm not seeing my classes?

folder structure :

  • mysite
    • app
    • env


Settings->Project interpreter - there is a path to mysite/env/bin/python3.5
But in the code it still highlights the code with a red wavy stripe
from poliv.settings import PUBLIC_URL
from category.models import Category

And so when in the terminal - e I run python3.5 manage.py runserver all the rules start

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2016-06-03
@kentuck1213

You are the sheep with you)))
It was necessary in the directory where all our modules are stored, right-click then -> Mark Directory As and select Sources root and after that it will turn blue:
after which PyCharm will see its classes as it should.

R
Roman Kitaev, 2016-04-07
@deliro

He has such visits. Reload charm.
Do not do that. Do like this:

from django.conf import settings
settings.PUBLIC_URL

M
marazmiki, 2016-04-08
@marazmiki

PyCharm by default starts looking for modules from the root of the project. Just point him to additional places to search. In your case, as I understand it, this is the app directory
In the project tree, select this directory and select from the context menu: Mark directory as -> Source root

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question