I am having issues with importing, my own, pip package named the same as a module inside a django-app. Lets say my own pip module is called: fancymodule
. I then have a module-folder inside a django-app named the same:
* django-project
* payments
* models.py
* fancymodule/
* __init__.py
The problem I am having, is that inside payments/models.py
, I import:
from fancymodule import ApiClient
This is suppose to reference the fancymodule
installed through pip. But is instead referencing the module inside the payments-django-app instead.
If I wanted to reference the module inside the payments-django-app, in my head, this should be:
from payments.fancymodule import whatever
I get that from the view of payments/models.py
, the import fancymodule ..
will reference fancymodule
inside the payments-folder.. but can i change/fix this, so it reference the fancymodule
installed through pip ?
FYI: Working on an old legacy project.
Home someone can help.