[python] ImproperlyConfigured: You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings
If you are using the local server, run Django shell using python manage.py shell. It will take you to the Django python environment and you are good to go.