I created a Django project inside of api
folder called bucks
:
api
|____ categories/|____ __init__.py|____ ...|____ models.py|____ tests.py|____ views.py
|____ .../
|____ bucks/
|____ users/|____ __init__.py|____ ...|____ models.py|____ signals.py|____ tests.py|____ views.py
|____ __init__.py
|____ manage.py
webroot
|___ ...
And in my bucks
folder inside the api
, I am doing the following:
from api.users.views import CustomObtainAuthToken
But I am facing an error when I run makemigrations
:
ModuleNotFoundError: No module named 'api'
I also tried to add users.app.UsersConfig
in my INTALLED_APPS
, but then, this error:
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
So I am in this impass. I couldn't find another way to import CustomObtainAuthToken
, it'd only allow me to access it through that syntax.