I want to be able to import my Django models into an external script to do things such as parse inputted URLs. I have tried creating a python script within the root folder of a Django app and simply importing the model as I would in views.py, however, I keep getting this error:
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I have searched through the Django docs but so far, I haven't been able to find anything. Anybody got any ideas?
Thanks!