Django settings not configured error
<p>I am doing the Django introductory tutorial from here:
<a href="https://docs.djangoproject.com/en/1.9/intro/tutorial05/" rel="noreferrer">https://docs.djangoproject.com/en/1.9/intro/tutorial05/</a></p>

<p>As described there, I opened the python shell and tried to import the project, like this:</p>

<pre><code>from polls.models import Question
</code></pre>

<p>However, I get this error:</p>

<pre><code>django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
</code></pre>

<p>I don't understand the error message very well. Where exactly should I define <code>DJANGO_SETTINGS_MODULE</code> or call <code>settings.configure()</code> ?</p>

<p>If I try to open the django shell, I get the same message.</p>