45👍
✅
Long time to find the solution:
In the conf.py
, add the following:
import django
sys.path.insert(0, os.path.abspath('..'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
django.setup()
Source:stackexchange.com