Hello Django
Masters. Could some one help me with importing modules? I’m new in Django, so please don’t judge me too hard.
This is my project structure:
Main/
├── Commons
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── modules
│ │ └── network.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── Restapi
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ └── __init__.py
│ ├── models.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── Main
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── __init__.py
└── manage.py
So my issues is:
In Commons
directory in views.py I need to import modules/network.py
Way where view.py
was able to execute:
from modules import network
But, than I get an error when I tried to do python3 manage.py migrate
from modules import network
ModuleNotFoundError: No module named 'modules'
I could say, that this error maybe resolved a long long time ago, by someone, but I did not undesnartd at all, please help me with this