123π
I was having this issue using a β2 Scoops of Djangoβ project layout, e.g.
/project_root
/project_dir
/config
/settings
/my_app
/tests
models.py
/requirements
readme.rst
The code was working, but in /tests, IntelliJ/PyCharm showed an unresolved reference:
from my_app.models import Something
I had all the __init__.py
files in place. I ended up having to set the sources root to project_dir
:
Right-click on project_dir, Mark Directory as > Sources Root
2π
Now that I can take a look over you project structure I can tell you that the problem appears to be related to a missing __init__.py
in your βsrcβ folder. Try adding an empty file named __init__.py
in the root of βsrcβ folder.
Also, take a look to this question, I think is the same problem or a very similar one.
Hope this could be useful, cheers!
- [Django]-How to check ImageField is empty
- [Django]-How to return an rest_framework.response object from a django custom middleware class?
- [Django]-Change a form value before validation in Django form
-2π
I was having this issue after I change my environment to virtualenv, so I changed my python interpreter to my current virtualenv.
Go to File > Settings > Project Interpreter.
In that window you would be able to see all packages includes on this interpreter, Django should be there.
This worked for me.
- [Django]-Django.db.utils.OperationalError Could not connect to server
- [Django]-Django Celery β Cannot connect to amqp://guest@127.0.0.8000:5672//
- [Django]-Invalid command WSGIDaemonProcess Deploy Django application on CentOS 6.7