[Answered ]-Django models aren't loaded yet

2👍

Writing

import django
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
django.setup()

instead of

from django.conf import settings
settings.configure()

should do the trick.

👤Wouter

Leave a comment