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
To fix this issue, you need to run it in python manage.py shell
instead of just python
.
Reason: Well, many parts of Django rely on settings and you won't be able to use them until it knows which settings file to use. When you run it on python manage.py shell
, Django knows which settings file to use and does the job for you.