DJANGO_SETTINGS_MODULE is undefined
You can use python manage.py shell instead of using IDLE.
manage.py reads and uses django settings including DJANGO_SETTINGS_MODULE.
when i input from django.db import models into IDLE,the result throw a exception named Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
why does this exception occur and how i can fix it