I\'m a beginner in django and I got a lot of errors when using template module from django. The following works from the python shell:
from django import templat
The error message states that you need to set the DJANGO_SETTINGS_MODULE variable. Running export DJANGO_SETTINGS_MODULE=mysite.settings, worked for me.
DJANGO_SETTINGS_MODULE
export DJANGO_SETTINGS_MODULE=mysite.settings